日期:2014-05-17 浏览次数:20980 次
client.Host = "192.168.0.4";
client.Port = 25;
client.EnableSsl = false;
public static bool SendNetMail(string fromEmail, string fromName, string toEmail, string serverName, string serverPwd, string subject, string body, string SMTP, string filePath)
{
MailMessage message = new MailMessage(fromEmail, toEmail);
message.Subject = subject;
message.Body = body;
message.IsBodyHtml = true;
message.SubjectEncoding = System.Text.Encoding.Default;
message.BodyEncoding = System.Text.Encoding.Default;