Trouble sending email with ASP .NET

Discussion in 'Email' started by drguill1, Nov 10, 2014.

  1. I am getting an error message when sending an email through a contact form:

    "Mailbox unavailable. The server response was: No such user here"

    I have followed the example on the Winhost site with the following code:

    MailMessage message = newMailMessage();
    message.From = newMailAddress("[email protected]");
    message.To.Add("[email protected]");

    //set the content
    message.Subject = "Request For Consultation";
    StringBuilder sb = newStringBuilder();
    sb.AppendLine("A request for a consultation has been sent through http://www.drguillotcosmeticsurgery.com.");
    sb.AppendLine();
    sb.AppendLine("Name: " + name);
    sb.AppendLine("Email: " + email);
    sb.AppendLine("Comments: " + comments);
    message.Body = sb.ToString();

    //send the message
    SmtpClient smtp = newSmtpClient("mail.drguillotcosmeticsurgery.com");
    NetworkCredential Credentials = newNetworkCredential("[email protected]", "mypasswordwenthere");
    smtp.Credentials = Credentials;
    smtp.Send(message);

    The postmaster email address is the default email so I know it exists. I've logged into CPanel and verified the email and logged into webmail with it.

    I also tried adding this to my web.config file:
    <system.net>
    <mailSettings>
    <smtp from="[email protected]">
    <network host="mail.drguillotcosmeticsurgery.com" userName="[email protected]" password="mypasswordwenthere" defaultCredentials="true"/>
    </smtp>
    </mailSettings>
    </system.net>

    Can anyone explain what the issue is and how to get the form working? Thanks in advance.
     
    Last edited by a moderator: Oct 14, 2015
  2. Elshadriel

    Elshadriel Winhost Staff

    Everything looks correct. You might want to make sure you are supplying the correct password.
     
  3. KelvinSmith

    KelvinSmith Guest

    Last edited by a moderator: Oct 14, 2015
    Michael likes this.
  4. ComputerMan

    ComputerMan Winhost Staff

    Also, that error message "No Such User Here" is very misleading and it usually means that you're not authenticating against the SMTP service on our email server.

    To confirm you're using the correct password for the email user. Try logging into the SmarterMail service directly. mail.YourDomainHere.com and use the full email address as the user name. Then use the password for that email user.

    If you can't log in then most likely you're using the wrong password for your email user that you're using to authenticate against the SMTP service.

    Follow these steps on how to reset your email user name below:

    You will need to login to the SmarterMail system with the postmaster email account first in order to change the password for the email user. To do this please login to your control panel on Winhost.

    Once you have logged in to your Winhost control panel. Click on the "Sites" tab at the top. Or simply click here: https://cp.Winhost.com/sites/

    Then click on "Your Domain name" you wish to manage.

    Click on the "Email" box under site tools. Or simply click here: https://cp.Winhost.com/sites/email.aspx

    Then click on the link "SmarterMail Manager"

    The link will automatically log you into the SmarterMail email system.

    Once you are in the SmarterMail email system. Click on the "Settings" button. (Looks like a gear icon)

    Then expand the "Domain Settings" folder if it is not already expanded.

    Click on "Users"

    Click on the Email User.

    Click edit.

    Enter the new password in the New Password field box and also re-enter the confirm password in the field provided.

    Then click "Save"

    Then use the new password for your email account.
     
    Last edited by a moderator: Oct 14, 2015
    Zorglub likes this.
  5. OK. Seems that my user was simply deleted. How could this have happened? I haven't performed any Winhost maintenance for some months. Things were working, but it seems as if all users were deleted.
     
  6. Elshadriel

    Elshadriel Winhost Staff

    Hi Nigel,

    I checked the account, but I don't see any indication that any of your email accounts were deleted. You also couldn't have performed any maintenance for months because the account was recently opened.
     
  7. The account is not new. I have emails from Winhost on 1/17/14 and from ICANN on 7/13/14 indicating that I needed to update the WHOIS information on the set which I duly performed. I have received emails using my AngelOakWine email address from 1/13/14, so the account has been around for several months. Emails are now working properly, but I just hope that nothing else has gone awry with the account. Can you not see when the account and domain was created and what has been maintained since we opened it?
     
  8. Elshadriel

    Elshadriel Winhost Staff

    Yes, your Winhost account is not new, but your site account for drguillotcosmeticsurgery.com was recently opened. You did have a site account and domain registration for drguillotplasticsurgery.com, but those ended in 2012 and 2013. Your email settings would not have transferred over.
     
  9. What is drguillotplasticsurgery.com? I have never heard of this. Do you re-use site numbers?
     
  10. Elshadriel

    Elshadriel Winhost Staff

    No, we do not re-use site numbers. If you'd like to discuss account details, then please open up a support ticket.
     

Share This Page