No User Here

Discussion in 'Email' started by wandrewcrawford, Dec 12, 2011.

  1. I receive an error message that the email address <[email protected]> is not a valid user. I am attempting to use ASP.NET to send an email when someone signs the Guestbook.

    The only time I can get this code to work is if a replace the "To:" email address with one that is listed in my email users. Does Winhost not allow applications to deliver mail to outside email addresses?

    I have copied the code below from the Knowledge Base and modified as necessary. This code is an exact copy of my code with the actual password removed.

    //create the mail message
    MailMessage mail = new MailMessage();

    //set the addresses
    mail.From = new MailAddress("[email protected]");
    mail.To.Add("[email protected]");

    //set the content
    mail.Subject = "This is an email";
    mail.Body = "This is from system.net.mail using C sharp with smtp authentication.";
    //send the message
    SmtpClient smtp = new SmtpClient("mail.graficimage.com");

    NetworkCredential Credentials = new NetworkCredential("[email protected]", "password");
    smtp.Credentials = Credentials;
    smtp.Send(mail);
     
    Last edited by a moderator: Oct 14, 2015
  2. Yes, I'm sure the server wasn't down. I had also submitted a support ticket on this matter, along with a copy of my code, and was told by support it appeared I was sending the right information, but that they would not assist me with my code and to post here.
     
  3. Ray

    Ray

    Yes we do, but from what you are describing, it sounds like you are not logging into the SMTP server correctly. Check the postmaster emial address and make sure it is coded correctly. Remember it is the full email address and double check that there are not invisible space before or after the email address, and also make sure that the password you are passing is for that email address. If you are not sure reset the email password for that pop account and update your code to make sure it matches.
     
    Last edited by a moderator: Oct 14, 2015
  4. I have made sure of all those things several times. I can send an email from one user to another user in the same account, but I cannot send to any user outside of my email account.
     
  5. Elshadriel

    Elshadriel Winhost Staff

    The error message means you are not authenticating correctly. I went and reviewed the ticket you mentioned, and if your password hasn't changed, then you are supplying the incorrect password as I could not log into webmail (SmarterMail) with the password you provided in the ticket. If you need to update/change the password, you can log into the postmaster account within the Winhost Control Panel.
     
  6. Solved!!!

    I can't believe all this time the postmaster account had a different password than the rest of the users I created. Dah!!!

    Thank you all so much. :)
     
  7. Glad you got it worked out.
     

Share This Page