2017-03-17 131 views
0
Smtp_Server.UseDefaultCredentials = False 
Smtp_Server.Credentials = New Net.NetworkCredential("[email protected]", "password") 
Smtp_Server.Port = 587 
Smtp_Server.EnableSsl = True 
Smtp_Server.Host = "mail2.website.com.my" 
'smtp-mail.outlook.com 
e_mail = New MailMessage() 
e_mail.From = New MailAddress(txtfeedbackname.Text) 
e_mail.To.Add(txtfeedbackname.Text) 
e_mail.Subject = "eConnect - Feedback from Employee" 
e_mail.IsBodyHtml = False 
e_mail.Body = txtComment.Text 
Smtp_Server.Send(e_mail) 

它在gmail中爲smtp服務器主機正常工作。當我把它變成我自己的SMTP其示值誤差:服務器不支持使用公司地址的安全連接

Error: Server does not support secure connection.

回答

2

要麼你有你的服務器,或者在連接字符串禁用SSL上安裝SSL。

現在你嘗試與連接:

Smtp_Server.EnableSsl = true 

設爲false,你應該能夠連接。

+0

我想說......你之前有過XML:') –

+0

是的,很快就糾正了它:-) –

相關問題