c#发送电子邮件通过godaddy错误发送失败 [英] c# send email through godaddy error failure sending

查看:110
本文介绍了c#发送电子邮件通过godaddy错误发送失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过godaddy发送电子邮件,但错误发送时失败..

这里是我的代码

send email through godaddy but error comes as failure sending..
here is my code

SmtpClient ss = new SmtpClient();
try
{
    ss.Host = "smtpout.secureserver.net";
    ss.Port = 25;
    ss.Timeout = 10000;
    ss.DeliveryMethod = SmtpDeliveryMethod.Network;
    ss.UseDefaultCredentials = false;
    ss.Credentials = new NetworkCredential("testingaccount@comicidolonline.com", "abc123");
     
    MailMessage mailMsg = new MailMessage("testingaccount@comicidolonline.com", "youremail@gmail.com", "subject here", "my body");
    mailMsg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
    ss.Send(mailMsg);
     
    Console.WriteLine("Sent email");
    Console.ReadKey();
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
    Console.ReadKey();
}

推荐答案

您需要联系GoDaddy支持并确保使用正确的凭据和连接信息。



此外,当您收到错误时,请发布错误,以便我们不必猜测。
You need to contact GoDaddy support and make sure you are using proper credentials and connection information.

Also, when you get an error, post the error so we don't have to guess.


这篇关于c#发送电子邮件通过godaddy错误发送失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆