Last post Oct 17, 2008 01:03 PM by AmyZ
Oct 15, 2008 11:04 AM|AmyZ|LINK
I'm a nubie, but I'm trying to use a custom form to allow people to email me. (http://www.academicsciencejobs.com/asj/Contact.aspx). This was working fine on my previous host but is not working now that I've switched to Godaddy.
However, the emails are not being sent and instead I get an error:
System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)
My email seems to be set up fine as I can email myself using thunderbird. I also can't see anything in the spam folder. Godaddy support have told me that I should be using relay-hosting.secureserver.net, port 25 with no credentials needed.
My code is:
protected void SendBtn_Click(object sender, EventArgs e)
if (Page.IsValid == true)
SmtpClient smtpClient = new SmtpClient("relay-hosting.secureserver.net");
MailMessage message = new MailMessage(EmailTB.Text, "firstname.lastname@example.org");
message.Subject = SubjectTB.Text;
message.Body = MessageTB.Text;
message.IsBodyHtml = true;
smtpClient.Port = 25;
smtpClient.EnableSsl = false;
Any help would be hugely appreciated. Godaddy are now complaining that they can't see 'relay-hosting.secureserver.net' in the source code on my page so won't help me further. Is there anyway to alter my page so that they will see it?
Many thanks in advance
Oct 16, 2008 02:09 PMemail@example.com|LINK
Might search the fourms:
Oct 16, 2008 08:00 PM|AmyZ|LINK
Thanks very much for your reply.
The only difference I see in their posts is (1) they used credentials and (2) they put the server and credentials in the web.config file. I've tried both these to no avail (and copied and pasted their code across). I still get the error message:
'System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)'
Do you know if there is anyway I can re-organise my code so that godaddy can see that I've included their relay-hosting.secureserver.net on my page source code? (I'm sorry, I'm a real newbie at this).
I've been working on this solidly for two weeks now, have read every forum thats even slightly related and definitely going slighly mad. Any idea's would be hugely appreciated.
Many thanks again
Oct 16, 2008 09:29 PM|Bruce L|LINK
What is the from Address you are using?
I think i read a post somewhere that GoDaddy blocks certain from address from sending mail.
Oct 17, 2008 04:56 AM|AmyZ|LINK
Thanks very much for your suggestion Bruce.
I'm using my 'firstname.lastname@example.org email address, which should work though.
Oct 17, 2008 01:03 PM|AmyZ|LINK
After reading your suggestion again, I see you meant the email that is typed into the form (not the email in the code), and you are absolutely right! It won't allow some emails such as gmail addresses but other emails seem to work fine and I'm now receiving
Thanks so much to both you and Jeff for all your help,