当前位置:编程学习 > C#/ASP.NET >>

godaddy 主机 用c#程序发邮件问题

我用C#.net写的邮件发送程序(用SmtpClient带SMTP密码验证的)在本地发送正常,但是传到Godaddy空间中后无法成功发送。
使用smtp.163.com做SMTP老是提示超时
使用Godaddy送的邮箱的SMTP发送提示没有权限,详细内容如下:
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

最后查看Godaddy网站帮助可以使用SmtpMail发送,然后就实验了是可以发送,还不需要SMTP验证,但国内的邮件服务商全部拒收,当垃圾邮件。代码如下:
        const string SERVER = "relay-hosting.secureserver.net";
        System.Web.Mail.MailMessage oMail = new System.Web.Mail.MailMessage();
        oMail.From = "emailaddress@domainname";
        oMail.To = "emailaddress@domainname";
        oMail.Subject = "Test email subject";
        oMail.BodyFormat = System.Web.Mail.MailFormat.Html; // enumeration
        oMail.Priority = System.Web.Mail.MailPriority.High; // enumeration
        oMail.Body = "Sent at: " + DateTime.Now;
        System.Web.Mail.SmtpMail.SmtpServer = SERVER;
        System.Web.Mail.SmtpMail.Send(oMail);
        oMail = null; // free up resources

请问有没有朋友使用过Godaddy虚拟主机的,有没有什么好的解决办法,需要用C#实现,可以成功发送国内外邮件。解决了的话在加200分。 --------------------编程问答-------------------- 没用过··帮顶 --------------------编程问答-------------------- --------------------编程问答-------------------- 没用过






人力资源 --------------------编程问答-------------------- 没用过 
--------------------编程问答-------------------- 有知道点的吗 提供点线索,我就结贴给分了! --------------------编程问答-------------------- godaddy 的主机不支持外部smtp服务器,只能用自己的服务器发(为了赚钱,他自己的服务器第天250封免费邮件,多了收费)。
--------------------编程问答-------------------- 学习中,路过顶贴!!!! --------------------编程问答--------------------
引用 6 楼 ooaaooxx 的回复:
godaddy 的主机不支持外部smtp服务器,只能用自己的服务器发(为了赚钱,他自己的服务器第天250封免费邮件,多了收费)。

还是要钱哦 --------------------编程问答-------------------- 解决了吗?我也是遇到这问题!不知道怎么弄 --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 不知道最后解决办法如何?现在我也碰到了这个问题,不知道现在有什么好的解决办法。
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,