Winhost e-mail settings ?

Discussion in 'Email' started by edkaufmann, Dec 20, 2010.

  1. I'm trying to enable 'User Registration' on my web site but have (obviously) not found
    the correct combination for the e-mail parameters!

    Any combination gives: "Failure sending mail"

    Based on the Winhost knowledge base I have set it according to below XML schema!

    ? Thank you for correcting me; I'm obviously wrong or something is missing!

    thanks for your time
    PS: any special considerations when using GMAIL?!

    Mail server hostname
    (When configuring your email program, replace "" in the examples below with your domain name.)

    •POP3 server hostname:
    •IMAP server hostname:
    •SMTP server hostname:
    •Webmail server hostname:
    POP and IMAP login name
    The login name for your POP and IMAP accounts is the full emailaddress, not just the user name. For example, if you create the POPaccount "," the login name is"" not "user." You must use the full emailaddress as the login name.

    <?xml version="1.0"?>
    <WebSiteData xmlns:xsi="" xmlns:xsd="">


    <FooterText>cc ASGB</FooterText>
    <WebSiteTitle />
    <Description>WEB Site .....</Description>

    ROUTINE to send mail:
    //Send email to user for verifying account
    MembershipUser user = Membership.GetUser(createUserWizard.UserName);
    string url = string.Concat("http://", Request.Url.Authority, Response.ApplyAppPathModifier("~/Login.aspx?activate="));

    MailMessage mail = new MailMessage(_website.MailSenderAddress, user.Email);
    mail.SubjectEncoding = System.Text.Encoding.UTF8;
    mail.Subject = string.Format(Resources.StringsRes.pge_UserRegistration_ActivationEmailSubject, "ASGB");
    //mail.Subject = string.Format(Resources.StringsRes.pge_UserRegistration_ActivationEmailSubject, _website.WebSiteTitle);
    mail.BodyEncoding = System.Text.Encoding.UTF8;
    mail.IsBodyHtml = false;
    mail.Body = string.Format(Resources.StringsRes.pge_UserRegistration_ActivationEmailBody, "ASGB", url, user.ProviderUserKey.ToString());
    //mail.Body = string.Format(Resources.StringsRes.pge_UserRegistration_ActivationEmailBody, _website.WebSiteTitle, url, user.ProviderUserKey.ToString());

    SmtpClient client = new SmtpClient(_website.SmtpServer);

    //when Smtp user/password/domain is given, SMTP-Authentication has to be used
    if (_website.SmtpUser != "" && _website.SmtpPassword != "" && _website.SmtpDomain != "")
    client.UseDefaultCredentials = false;
    client.Credentials = new NetworkCredential(_website.SmtpUser, _website.SmtpPassword, _website.SmtpDomain);

    Last edited by a moderator: Oct 14, 2015
  2. Ray


    Make sure you replace "postmaster@HostingAccountDomain .org" with your actual domain name. Remember the kb article is written as an example, and you should replace as your actual domain name.
  3. Are you using Gmail for your domain's email, or did you mean when sending to a Gmail address?
  4. Hi Ray + Hank,

    thanks for your time.1
    changing the domain name to mine is understood.

    Ray: because I read some issues re gmail I asked. In my case I only use gmail privately NOT on a private domain! So, I assume no special considerations!
  5. Ray


    Not on our part but gmail may have so you may want to contact them for more information.
  6. Sorry for coming back. I read the Winhost email forums but still do not have an answer ... might be, however, I missed something in the definitions of SmarterMail ....?

    when using for
    To: (this a valid gmail address; i changed to i.h for sec reasons). This gives below error msg. (no such user here, of course I did not define in SmarterMail)

    do I need to define anything in SmarterMail to send to any non-SmarterMail address?
    thanks for your advise.
    PS: when sending TO: Postmaster... I get it because i set forwarding in SmarterMail!

    Mailbox unavailable. The server response was: <> No such user here
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <> No such user here

    Source Error:

    Line 57: }
    Line 58:
    Line 59: client.Send(mail);
    Line 60: }
    Line 61:

    Source File: e:\web\asgbarba\UserRegistration.aspx.cs Line: 59

    Stack Trace:

    [SmtpFailedRecipientException: Mailbox unavailable. The server response was: <> No such user here]
    System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +1087059
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1480
    UserRegistration.createUserWizard_CreatedUser(Object sender, EventArgs e) in e:\web\asgbarba\UserRegistration.aspx.cs:59
    Last edited by a moderator: Oct 14, 2015
  7. Ray


    It sounds like you are not setting up SMTP authentication correctly.

    Try looking a this kb article for an example of how to code your web page to send email through our SMTP server.

    What you should do first is create a simple test script like the one given on this kb article so you can get familiar with coding ASP.Net to send email and pass SMTP authentication. Then from there once you understand the code you can try to integrate it with your web application.
    Last edited by a moderator: Oct 14, 2015
  8. Ray, thanks for your time

    based on the sample I have now a running versio.
    It seems that certain encoding parameters weren't correct. will further evaluate.

    But, I consider this thread closed
    Thanks again, ed

Share This Page