email from .net never received

Discussion in 'ASP.NET / ASP.NET Core' started by realien, Jun 10, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have some test code to send an email, very simple the smtp server is set to localhost and the sender is a valid account on my discountasp hosted domain. There are no exceptions thrown (which ther would be if the smtp server was wrong) but the email is never received.

    here is the code :

    MailMessage mail = new MailMessage();
    mail.To = '[email protected]';
    mail.From = '[email protected]';
    mail.Subject = 'Test email \r\n';
    mail.Body = messageTextBox.Text + ' this is a test of the new line \r\n';
    SmtpMail.SmtpServer = 'localhost';

    try
    {
    SmtpMail.Send(mail);
    resultsBox.Text = 'Message sent from ' + mail.From + ' to ' + toAddressTextBox.Text;
    }
    catch (Exception ex)
    {
    resultsBox.Text = ex.Message;
    }

    I get no exceptions but the email is never receved at my bluetube account which has been receiving email all day fine and atlantaoutdoorkitchens.com (the sender) is on my whitelist. I uploaded the same code to my networksolutions .net account and changed the sender to that domain it uses (neoreststore) and it send email AND I receive it fine, does this look like an .NET account issue to you guys ?
     
  2. I think the server was blocked as its working now with no code changes.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page