SMTP邮件消息Seding失败 [英] SMTP Mail Message Seding Failed
本文介绍了SMTP邮件消息Seding失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我使用SMTP客户端发送邮件,发送邮件时显示错误如下;
发送邮件失败
请有人帮忙解决这个问题
谢谢
Mohan
解决方案
亲爱的,
使用系统.Net.Mail;
private void MailSend()
{
try
{
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient(smtp.gmail.com);
SmtpServer.Host =smtp.gmail.com;
mail.From = new MailAddress(FromMailName@gamil.com);
mail.To.Add(ToMailName@gmail.com);
mail.Subject =测试邮件;
mail.Body =这是用于测试来自GMAIL的SMTP邮件;
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential(ToMailName@gmail.com,123456); //用户邮件名称和邮件密码
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
}
catch(exception ex)
{
MessageBox.Show(ex.ToString());
}
}
如果你喜欢这个解决方案,请投票。
类似的主题在这里:发送邮件失败 [ ^ ] ...这可以帮到你:0
Hi Mohan ...
我也遇到了同样的问题,为了解决我打电话给我的邮件服务器提供商的问题,他们告诉我们他们不支持SMTP服务器。
所以我的建议是,你必须与你的服务提供商确认
他们是否提供SMTP服务与否。
祝你好运
Amit Vishwakarma
Hi
I am using SMTP client for sending mails, while sending mail it shows error as follows ;
Failure sending mail
Please someone help to resolve this problem
Thanks
Mohan
解决方案
Hi dear,
using System.Net.Mail;
private void MailSend() { try { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); SmtpServer.Host = "smtp.gmail.com"; mail.From = new MailAddress("FromMailName@gamil.com"); mail.To.Add("ToMailName@gmail.com"); mail.Subject = "Test Mail"; mail.Body = "This is for testing SMTP mail from GMAIL"; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential("ToMailName@gmail.com", "123456"); // User Mail Name And Mail Password SmtpServer.EnableSsl = true; SmtpServer.Send(mail); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
If you like this solution plz vote.
Similar thread is here : Failure Sending Mail[^]... This could help you :0
Hi Mohan...
I was also facing the same problem, for solving the problem I called my mail server provider, they told they did not support SMTP server.
So my suggestion is, you will have to confirm with your service provider
whether they are provide SMTP service or not.
Best of luck
Amit Vishwakarma
这篇关于SMTP邮件消息Seding失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文