asp.net c#代码使用IP地址发送邮件 [英] asp.net c# code to send mail eithout using IP address
本文介绍了asp.net c#代码使用IP地址发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
asp.net c#代码可以使用IP地址发送邮件
解决方案
在CP上查看一些有用的文章:
使用ASP.NET 2.0的简易SMTP邮件 [ ^ ]
使用ASP.NET的电子邮件系统 [ SendMail 101-如何发送通过SMTP的电子邮件(C#和ASP.NET) [使用ASP.NET发送电子邮件 [设置和配置SMTP虚拟服务器 [在Windows Server中设置SMTP安全选项 [ 新 MailMessage(); mail.From = 新 MailAddress(" ); mail.To.Add(" ); mail.Subject = " ; mail.IsBodyHtml = true ; mail.Body = " ; var mailClient = 新 SmtpClient(" smtp.gmail.com", true ; mailClient.Credentials = 新 System.Net.NetworkCredential(" , 密码"); mailClient.Send(mail);
看看这个技巧: ^ ]
>
asp.net c# code to send mail eithout using IP address
解决方案
Check some useful articles on CP:
Easy SMTP Mail Using ASP.NET 2.0[^]
Email System Using ASP.NET[^]
SendMail 101 - How to send e-mails over SMTP (C# and ASP.NET)[^]
Have a look on some more links:
Sending Emails using ASP.NET[^]
Set Up and Configure an SMTP Virtual Server[^]
Set SMTP Security Options in Windows Server[^]
var mail = new MailMessage(); mail.From = new MailAddress("Email adress"); mail.To.Add("to Email"); mail.Subject = "Event Information"; mail.IsBodyHtml = true; mail.Body = "body"; var mailClient = new SmtpClient("smtp.gmail.com", 587); mailClient.EnableSsl = true; mailClient.Credentials = new System.Net.NetworkCredential("Email", "password"); mailClient.Send(mail);
Have a look at this Tip: Sending an Email in C# with or without attachments: generic routine.[^]
这篇关于asp.net c#代码使用IP地址发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文