当前位置 : 主页 > 编程语言 > c语言 >

vb.net – 使用smtp发送电子邮件,但使用ZOHO操作超时

来源:互联网 收集:自由互联 发布时间:2021-06-24
Dim Smtp_Server As New SmtpClientDim e_mail As New MailMessage()Smtp_Server.UseDefaultCredentials = FalseSmtp_Server.Credentials = New Net.NetworkCredential(abc@zoho.com,abc123)Smtp_Server.Port = 465Smtp_Server.EnableSsl = TrueSmtp_Server.H
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential(abc@zoho.com,abc123)
Smtp_Server.Port = 465
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.zoho.com"
e_mail = New MailMessage()
e_mail.From = New MailAddress(abc@zoho.com)
e_mail.To.Add("david@hotmail.com")
e_mail.Subject = "Testing"
e_mail.IsBodyHtml = False
Smtp_Server.Send(e_mail)
Return True

现在我尝试向其他人发送电子邮件,但错误显示操作超时,当使用ZOHO发送时.我找到了解决方案,但仍然无法发送.我该如何解决?

尝试使用PORT:587

Smtp_Server.Port = 587
网友评论