2016-11-16 58 views
-1

我想從我的網站發送電子郵件,我有我的webconfig通過私人電子郵件

<system.net> 
    <mailSettings> 
     <smtp deliveryMethod="Network" from="[email protected]"> 

     <network host="smtp.privateemail.com" port="587" enableSsl="true" defaultCredentials="false" userName="[email protected]" password="*****" /> 
     </smtp> 
    </mailSettings> 
    </system.net> 

這些設置,但這種例外

InnerException = {"The remote name could not be resolved: '[email protected]'"} 

回答

0

這個問題來當發送電子郵件的Asp.net您的代碼無法訪問您的郵件服務器。請檢查您的服務器在您的應用程序安裝位置是否有權訪問您的電子郵件服務器您可以嘗試從應用程序服務器ping通電子郵件服務器。

另外,您可以嘗試使用smtp服務器的IP而不是郵件服務器名稱。

相關問題