Unable to send email programatically

Discussion in 'ASP.NET / ASP.NET Core' started by mcramer, Jan 3, 2010.

  1. For some reason I am unable to send email programatically from my account.

    here is my code (there are valid values for the variables):

    MailMessage mm = new MailMessage();
    mm.From = new MailAddress(from);
    mm.To.Add(to);
    mm.Subject = subject;
    mm.Body = body;
    SmtpClient client = new SmtpClient("localhost");
    client.Send(mm);

    This seemed to work for a day then stopped for some reason. Any ideas?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    errors?
     

Share This Page