可能重複:
Sending email in .NET through Gmail通過SMTP發送郵件(Gmail的服務器)
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = subject,
Body = body
})
{
smtp.Send(message);
}
我運行該程序,他給我帶來了錯誤無法提交郵件。這裏是代碼可能是什麼問題?
InnerException? – Skomski
可能的重複: http://stackoverflow.com/questions/32260/sending-email-in-net-through-gmail – kleinohad