使用 asp.net 向 GoDaddy 发送电子邮件

问题描述

我正在使用下面的代码向 Webmail GoDaddy 发送电子邮件,它在我的本地机器上运行良好,但在客户端服务器上部署时却无法正常工作。

下面是我的代码

MailMessage message = new MailMessage();
SmtpClient smtpClient = new SmtpClient();
MailAddress fromAddress = new MailAddress("xyz@com");
message.From = fromAddress;                        
message.To.Add("abc@gmail.com");
message.Subject = "test Message";
message.IsBodyHtml = true;
message.Body = "we are here";
smtpClient.Host = "mail.trustwellhospitals.com";   
smtpClient.Port = 25; 
smtpClient.EnableSsl = false;
smtpClient.UseDefaultCredentials = false;
System.Net.NetworkCredential("username","password");
smtpClient.Send(message);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)