Marek Marek - 1 month ago 8
C# Question

Not able to send message from server email do my gmail

I am trying to send message from server email to my gmail

WebMail.SmtpServer = "mail.marekjedrysiak.com";
WebMail.SmtpPort = 25;
WebMail.EnableSsl = true;
WebMail.UserName = "mail@marekjedrysiak.com";
WebMail.Password = "******";
WebMail.From = "mail@marekjedrysiak.com";

WebMail.Send("marekjedrysiak1@gmail.com", "Message from server",null);


then coming this message :

then coming this message :

Please help :(

Answer

This isn't an ASP.NET or C# related problem, your domain doesn't have an MX record. You can confirm this by checking http://www.mxtoolbox.com.

I see that your domain is registered with Tucows (Hover). In order to change your MX records:

  1. Log in to your Hover account. If you have multiple domain names, select your marekjedrysiak.com domain.
  2. Click the DNS tab.
  3. Click Add New.
  4. For Record Type, select MX.
  5. Enter the address of your mail server.
  6. Click Save.

If you need more help setting up or debugging your mail service, you should contact Hover's support. They can also advise you on what exactly to enter as the address of your mail server.

Source: https://help.hover.com/hc/en-us/articles/217282457-How-to-Edit-DNS-records-A-CNAME-MX-TXT-and-SRV-Updated-Aug-2015-

Comments