如何从 gmail、hotmail、rediffmail 以外的网站发送邮件。没有提供任何API。是否有任何编程语言可以实现这一点?我认为我要使用的域没有任何验证码检查。 我还想在其中附加一个文件夹。
最佳答案
如果您询问其他域名,例如您自己的域名,则可以使用以下方法:
使用 System.Net.Mail 添加;
然后在某些事件中如下
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("mail.yoursite.com");
mail.From = new MailAddress("testing@yoursite.com");
mail.To.Add("youremail@address.com");
mail.Subject = "New Email";
mail.Body = "add text here from controls";
SmtpServer.Port = 25;
SmtpServer.Credentials = new System.Net.NetworkCredential("testing@yoursite.com", "passhere");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);
MessageBox.Show("All Done");
关于java - 以编程方式从第三方站点发送邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40448934/