cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Asp.net Unable to send mails though godaddy relay setings

Hey guys!

I am unable to make my contact form send an email. I am using the godaddy relay smtp settings (shown below). but nothing works. I am not getting an error it just looks like the mail should have been sent but i doesnt. 

 

If i change the smtp host to smtpout.secureserver.net i am able to make the contact form send an email when hosting the site locally but the issue is the same when trying the hosted site. 

 

my code:

Web.config:

  <system.net>
    <mailSettings>
      <smtp from="name@domain.com">
        <network host="relay-hosting.secureserver.net" port="25"/>
      </smtp>
    </mailSettings>
  </system.net>

aspx.cs:

 MailMessage msg = new MailMessage();
                msg.To.Add(new MailAddress(TextBoxEmail.Text));
                MailAddress mailAddress = new MailAddress("name@domain.com");
                msg.From = mailAddress;
                msg.Subject = "This is a Test Mail";
                msg.Body = "This is a test message";
                msg.IsBodyHtml = true;
               

                SmtpClient client = new SmtpClient();
                client.Port = 25;
                client.Host = "relay-hosting.secureserver.net";
                client.UseDefaultCredentials = false;
                client.Credentials = new NetworkCredential("name@domain.com", "password");
                client.DeliveryMethod = SmtpDeliveryMethod.Network;
                client.EnableSsl = false;
                client.Send(msg);

 

I really hope you guys can help me out here because the support unfortunetly cant.

 

0 REPLIES 0