1
我知道也許我的問題有些奇怪,但我想從asp.net web項目發送電子郵件到我的註冊客戶端。我可以很容易地使用gmail來做到這一點。但我想從Parallels Webmail
發送它。 我的C#代碼是這樣的:
Parallels Webmail問題
using (MailMessage mm = new MailMessage("[email protected]", email))
{
mm.Subject = "Account Activation";
string body = "Hello " + name.Trim();
mm.Body = body;
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "mydomain.com";
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential("[email protected]", "mypassword");
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 26;//587 is also tested
smtp.Send(mm);
}
,但我得到的錯誤 「A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.63.251.194:26
」
我相信我無法發送正確smtp.host格式。
這只是在paralles
設置電子郵件客戶端錯誤消息的截屏也在這裏:
任何意見讚賞。
端口25送我低安全連接錯誤 –
@RezaPaidar刪除'smtp.EnableSsl = TRUE;'並再次嘗試 – Mostafiz
給我「服務器不支持安全連接「。 –