private void sendMail()//発信
{
string ToAddr = "<XX@XX.com><YY@YY.com>";
string Subject = "test";
MailMessage objMail = new MailMessage();
objMail.BodyEncoding = System.Text.Encoding.GetEncoding("shift-jis");
objMail.Body = "SMTP test";
objMail.To = "XXX@XXX.com"; //宛先
objMail.From = "@XXX.com"; //送信元
objMail.Subject = Subject; //件名
SmtpMail.SmtpServer = "smtp2.XX.co.jp";
SmtpMail.Send(objMail); //メール送信実行
Subject = "";
}
posted on 2011-05-25 11:44
Ying-er 阅读(243)
评论(0) 编辑 收藏 所属分类:
SMTP 、
.Net