Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
using System.Net.Mime;



public partial class _Default : System.Web.UI.Page     
    
{
    MailMessage mail = new MailMessage();
    private void clear()
{
    TextBox2.Text = "";
    TextBox4.Text = "";
    TextBox5.Text = "";
}

    protected void Button2_Click(object sender, EventArgs e)
    {
     
        {                           
           
            
            {
                MailMessage message = new MailMessage();
                message.From = new MailAddress("nch@gmail.com");
                message.To.Add(new MailAddress("nch@gmail.com"));
                message.Subject = "test";
                message.Body = "This is test";

                SmtpClient msg = new SmtpClient("relay-hosting.secureserver.net");
                msg.Credentials = new System.Net.NetworkCredential("francis@protonbpo.com", "***********");
                msg.Port = 25;
                msg.EnableSsl = false;
                msg.Send(message);

            }
        }
    }
}

Error:
Mailbox name not allowed. The server response was: sorry, relaying denied from your location [183.83.83.176] (#5.7.1)
Posted
Updated 2-Aug-11 23:45pm
v2
Comments
Herman<T>.Instance 3-Aug-11 5:46am    
what is between your computer and the godaddy server? is there a company network in between? and who is the provider of the internet network? Is there an internal smtp server available in the company or one at the internet network provider

This is the code i got it, if anyone needs you can copy, and dnt forget to change your id and password.

Thanks a lot friends.




using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
using System.Net.Mime;



public partial class _Default : System.Web.UI.Page

{
MailMessage mail = new MailMessage();
private void clear()
{
TextBox2.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
}

protected void Button5_Click(object sender, EventArgs e)
{

{


{
MailMessage message = new MailMessage();
message.From = new MailAddress("abc@protonbpo.com");
message.To.Add(new MailAddress(TextBox2.Text));
message.Subject = TextBox4.Text;
message.Body = TextBox5.Text;

SmtpClient msg = new SmtpClient("smtpout.asia.secureserver.net");
msg.Credentials = new System.Net.NetworkCredential("abc@protonbpo.com", "**********");
msg.Port = 25;
msg.EnableSsl = false;
msg.Send(message);

Label1.Visible = true;
Label1.Text = "Mail sent";
clear();
//Label1.Visible = false;
}
}
}
protected void Button4_Click(object sender, EventArgs e)
{
clear();
}
}
 
Share this answer
 
Just remove the Port No it will work in godaddy server, Check the EmailId and Password.
 
Share this answer
 
If I trace your IPAddress you are part of the BeamTele network. Use the smtp server of BeamTele
 
Share this answer
 
Comments
manoharnch 3-Aug-11 6:28am    
Grate how u done it ?
Herman<T>.Instance 3-Aug-11 7:14am    
just a tracert command......
if the problem is fixed set this thread to answered
Herman<T>.Instance 3-Aug-11 7:38am    
in your errormessage there was placed:
relaying denied from your location [183.83.83.176]....there is your IP address
 
Share this answer
 
Comments
manoharnch 3-Aug-11 5:40am    
U sent me the same url....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900