可能重复:
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