我正在使用下面的代码在 vb.net 中发送邮件,此代码适用于 gmail,但不适用于 rediffmail
Mail.Subject = "test email"
Mail.To.Add(dgr.Cells("to@xyz.com")
Mail.From = New MailAddress("from@abc.com")
Mail.Body = "Hello"
Dim attachment As System.Net.Mail.Attachment
attachment = New System.Net.Mail.Attachment("AttachPath")
Mail.Attachments.Add(attachment)
Dim SMTP As New SmtpClient("smtp.rediffmailpro")
SMTP.EnableSsl = false
SMTP.Credentials = New System.Net.NetworkCredential("xyz@.abc.com",
"password")
SMTP.Port = 25
SMTP.Send(Mail)
任何原因?或解决方案,以便我可以使用任何电子邮件 ID 发送邮件