不允许使用邮箱名称。服务器响应是:抱歉,该域名不在我允许的rcpthosts列表中。 [英] Mailbox name not allowed. The server response was: Sorry, that domain isn't in my list of allowed rcpthosts.

查看:510
本文介绍了不允许使用邮箱名称。服务器响应是:抱歉,该域名不在我允许的rcpthosts列表中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法从godaddy服务器发送电子邮件。获取以下错误,

不允许使用邮箱名称。服务器响应是:抱歉,该域名不在我允许的rcpthosts列表中。



这是我的代码片段。



Not able to send email from godaddy server. Getting following error,
Mailbox name not allowed. The server response was: Sorry, that domain isn''t in my list of allowed rcpthosts.

Here is my code snippet.

System.Net.Mail.SmtpClient Mail = new System.Net.Mail.SmtpClient();

        Mail.Host = "smtpout.secureserver.net";
        Mail.Port = 3535;
        Mail.Timeout = 10000;
        
        string username = null;
        string Password = null;


        Mail.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
        username = txtUsername.Text.Trim();
        Password = txtPassword.Text.Trim();
        System.Net.NetworkCredential basicAuthenticationInfo = new System.Net.NetworkCredential(username, Password);

        Mail.UseDefaultCredentials = false;
        Mail.Credentials = basicAuthenticationInfo;

        System.Net.Mail.MailMessage myMail = new System.Net.Mail.MailMessage();
        myMail.Subject = "Test Email";

        myMail.From = new System.Net.Mail.MailAddress(txtFrom.Text, txtFrom.Text);
        myMail.To.Add(new System.Net.Mail.MailAddress(txtTo.Text));


        myMail.IsBodyHtml = true;
        myMail.Body = "Test Email";


        try
        {
            Mail.Send(myMail);
            lblmsg.Text = "Message send successfully.";
        }
        catch (Exception ex)
        {
            lblmsg.Text = ex.Message.ToString();
        }





我尝试使用端口25和3535,但同样的错误即将发生。



I have tried with port 25 and 3535 but same error is coming.

推荐答案

请检查以下链接,



http://forums.asp.net/post/1132700.aspx [ ^ ]



http://forums.asp.net/t/939893.aspx/1 [ ^ ]
Please check following links,

http://forums.asp.net/post/1132700.aspx[^]

http://forums.asp.net/t/939893.aspx/1[^]


这是一个服务器配置,没有程序员无法访问服务器就无法修复。您不能通过该服务器中继到目标域,只有服务器管理员可以为您修复。





用此代码替换您的代码并检查天气是否正常工作。

我检查过它并在我身边工作正常。







尝试

{

SmtpClient客户端=新的SmtpClient(smtpout.secureserver.net,3535) ;

System.Net.NetworkCredential myCache = new System.Net.NetworkCredential(完整的电子邮件ID,密码);

client.Credentials = myCache;

//指定邮件内容。

MailMessage message = new MailMessage(pankaj@idjo.org,pankaj@idjo.org);

message.Body =test;

message.Subject =test;

client.Send(message);

message.Dispose ();

Console.WriteLine(发送电子邮件至:+pankaj@idjo.org);

}

catch(例外ex)

{

控制台.WriteLine({0}例外捕获。,ex);

}
This is a server configuration, nothing a programmer can fix without access to the server. You''re not allowed to relay through that server to the destination domain, and only the server admin can fix that for you.


Replace your code with this code And check weather it works fine or not.
I checked it and works fine from my side.



try
{
SmtpClient client = new SmtpClient("smtpout.secureserver.net", 3535);
System.Net.NetworkCredential myCache = new System.Net.NetworkCredential("complete email id", "password");
client.Credentials = myCache;
// Specify the message content.
MailMessage message = new MailMessage(pankaj@idjo.org, "pankaj@idjo.org");
message.Body ="test";
message.Subject ="test";
client.Send(message);
message.Dispose();
Console.WriteLine("Sent email to: " + "pankaj@idjo.org");
}
catch (Exception ex)
{
Console.WriteLine("{0} Exception caught.", ex);
}


尝试这个 [ ^ ]



希望有帮助:)
Try This[^]

hope it helps :)


这篇关于不允许使用邮箱名称。服务器响应是:抱歉,该域名不在我允许的rcpthosts列表中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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