我想从我的 yahoomail Id 发送邮件。如何使用 VB.NET 或 C#.NET 代码从 yahoo mail Id 发送邮件。需要善意的帮助..提前谢谢。
西瓦库马尔
以下是一些制作基本 html 电子邮件消息的示例。
http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html
' VB
Dim m As MailMessage = New MailMessage
m.From = New MailAddress("[email protected] /cdn-cgi/l/email-protection", "Your Name")
m.To.Add(New MailAddress("[email protected] /cdn-cgi/l/email-protection", "Recipient Name"))
m.Subject = "Hello"
' Specify an HTML message body
m.Body = "<html><body><h1>My Message</h1><br>Put the body here.</body></html>"
m.IsBodyHtml = True
' Send the message
Dim client As SmtpClient = New SmtpClient("smtp.mail.yahoo.com")
client.Send(m)
// C#
MailMessage m = new MailMessage();
m.From = new MailAddress("[email protected] /cdn-cgi/l/email-protection", "Your Name");
m.To.Add(new MailAddress("[email protected] /cdn-cgi/l/email-protection", "Recipient Name"));
m.Subject = "Hello";
// Specify an HTML message body
m.Body = "<html><body><h1>My Message</h1><br>Put the body here.</body></html>";
m.IsBodyHtml = true;
// Send the message
SmtpClient client = new SmtpClient("smtp.mail.yahoo.com");
client.Send(m);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)