Emailing to addresses Not on mydomain.com fail

Discussion in 'Email' started by ggoodall, Oct 28, 2010.

  1. In my web application I am using asp.net System.Net.Mail.

    I can send email TO addresses that are defined on mail.mydomain.com, but not to addresses anywhere else.

    Sending to [email protected] works fine.
    Sending to [email protected] or [email protected] fails.

    This is the error message:

    Message: Sys.WebForms.PageRequestManagerServerErrorException: Mailbox unavailable. The server response was: <[email protected]> No such user here


    Here is my C# code:

    MailMessage mm = new MailMessage();
    //Set the From and To addresses
    mm.From = new MailAddress("[email protected]");
    mm.To.Add(new MailAddress(TheEmailAddress(txtUserName.Text)));

    //Set the Subject and Body Content
    mm.Subject = "Password Recovery";
    mm.Body = string.Concat("Your password is: ", ThePassword(txtUserName.Text));

    //Setup the smtp authentication credentials
    NetworkCredential credentials = new NetworkCredential();
    credentials.UserName = "[email protected]";
    credentials.Password = "thepassword";

    //Send the message with smtp authentication
    SmtpClient client = new SmtpClient("mail.mydomain.com");
    client.Credentials = credentials;
    client.Send(mm);

    Please advise.

    Thanks,
     
  2. Ray

    Ray

    The error message can mean two things. One is that the email address you are trying to email to does not exist. Try sending it an email form another account such as a gmail account
    Make sure you have the SMTP authentication passed correctly. Double check your spelling of the SMTP server and that it is pointing to the correct server. Test the email login and password and make sure it is correct.
     
  3. ASP.NET SMTP Email Problem: Mailbox Unavailable

    Anyone,
    I have been troubleshooting this problem for several days with no avail. Many threads talk about this problem but none of the advice has helped me so far, probably because I am lost! When trying to run smtpclient I get the error:
    "Mailbox unavailable. The server response was: Verification failed for <[email protected]>"

    Here is the VB Code I have sending the email:

    Try
    Dim strFrom = "[email protected]"
    Dim strTo = "[email protected]"
    Dim MailMsg As New MailMessage(New MailAddress(strFrom.Trim()), New MailAddress(strTo))
    MailMsg.BodyEncoding = Encoding.Default
    MailMsg.Subject = "This is a test"
    MailMsg.Body = "This is a sample message using SMTP authentication"
    MailMsg.Priority = MailPriority.High
    MailMsg.IsBodyHtml = True
    'Smtpclient to send the mail message

    Dim SmtpMail As New SmtpClient
    Dim basicAuthenticationInfo As New System.Net.NetworkCredential("[email protected]", "*********")
    SmtpMail.Host = "mail.mydomain.com"
    SmtpMail.UseDefaultCredentials = False
    SmtpMail.Credentials = basicAuthenticationInfo

    SmtpMail.Send(MailMsg)
    lblmessage.Text = "Mail Sent"
    Catch ex As Exception
    lblmessage.Text = "error sending the email: " + ErrorToString.ToString
    End Try

    I have validated that each email is correct by logging into the SmarterEmail program provided by Winhost withthe credentials from the code. I have also copied and pasted the exact string contained in the credential i.e. ("[email protected]", "*********") which authenticated the SmarterEmail program.

    In the code I am using:
    Imports System.Data.SqlClient
    Imports System.Data
    Imports System.Web
    Imports System.Data.Sql
    Imports System.Data.Odbc
    Imports System.Net.Mail
    Imports System.IO
    Imports System.Net

    I have tried the code examples in:
    http://support.Winhost.com/KB/a650/how-to-send-email-in-aspnet.aspx

    Can someone please shed some light onto the issue for me. I have been testing on my local machine as well as pushing the code out to the web with the same result.
     
    Last edited by a moderator: Oct 14, 2015
  4. Ray

    Ray

    I am assuming that --<[email protected]>-- is an example and not the actual email address you are typing in your code.

    The error message --Verification failed for <[email protected]>-- is fairly straight forward. The login you are using to log into our email server is incorrect. Either the login or the password is incorrect. Make sure that [email protected] is an actual POP account in our email server. If it is not you will need to create it. Make sure you are typing the correct password associated to it.
     
  5. How do I ensure that my email with Winhost is POP?

    Ray,
    The actual email is [email protected].

    I can log into the SmarterMail Enterprise 5.5 with [email protected] and the password I am using in the code just fine. Where do I look inside of SmarterEmail to view if the email is POP?
     
  6. Ray

    Ray

    I checked the whois record for tomlico.com and it is not pointing to our DNS servers. Contact your registrar and have them update the name servers to...

    ns1.Winhost.com
    ns2.Winhost.com
    ns3.Winhost.com
     
    Last edited by a moderator: Oct 14, 2015
  7. Ray,
    I got the name servers updated with the registrar which did the trick! Thanks for the help!
     

Share This Page