Email does not work

Hi,

I am trying to send an email but it’s not working, i get the following error:-

Transaction failed. The server response was: 5.7.1 EMAILADDRESS: Relay access denied

See where it gives EMAILADDRESS is the actual email address i want it to be sent to. The web url is below:-

http://kidsunlimi2.eweb102.discountasp.net/default.aspx

If you look at the bottom right “Parents get in touch” section. Try filling in the form and submitting it. You will get an error. Now just so you know the website is currently running on a test domain on DiscountASP and i was thinking maybe when the website is live the email will start working?

Anyway, this is my code:-


    protected void Button1_Click(object sender, EventArgs e)
    {
        MailMessage message = new MailMessage("enquiries@kidsunlimited.com", "kevin.preece@kidsunlimited.co.uk");
        message.Subject = "Call Back request";
        message.Body = "Please call " + txt_name.Text + ", available on " + txt_tel.Text + ". Enquiring about " + DropDownList1.SelectedValue;
        SmtpClient client = new SmtpClient("cust3512-1.in.mailcontrol.com");
        client.Send(message);
    }

Also i’ve noticed if i use any other email address apart from this “kevin.preece@kidsunlimited.co.uk” then it sends the email perfectly. So why does this specific email address not work?

Can you see any problems?

Thanks

The problem is that the smtp server you are trying to use, is not allowing SMTP access to your server. Either needs a firewall exception, or authentication or both

So basically this SMTP account “cust3512-1.in.mailcontrol.com” is not allowing or giving me access, therefore i need to change the firewall settings to give me access?

Any chance you could elaborate how i need to do this? As i need to explain this to the client and he will have to do it and you know clients are not the brightest of people :smiley:

Thanks again

lol. Yes, you are indeed correct about clients. lol. It could also be that the email address does not exist, which is required.

It is rather hard to xplain this as there are quite a few things that needs to be done and its different depending on the setup. What mail server software are they using? What firewall hardware/software? etc.

First start by making sure the from email address is created and has SMTP access on the server. And also make sure that server supports connections to port 25 from your webserver.

I hope this helps a bit

Thanks i will get in touch with the client and let you know…

:rolleyes: