Sending emails to hotmail via web forms RRS feed

  • Question

  • User-709623068 posted

    I am trying to create a web form that takes a users email address and then sends them a confirmation email. The problem I am having is that all other email address (that I have tested) work, except for hotmail accounts. Is this a known issue? I have created a few brand new accounts on hotmail just to test them, and still nothing. I have configured the mail server, and will post the code I am using to send the email. Thanks:


    protected void btnEmail_Click(object sender, EventArgs e)
            string fromAddress = "someEmailAddress@hotmail.com";
            string fromName = "Todd";
            string toFirstName = txtFirstName.Text;
            string toLastName = txtLastName.Text;
            string toAddress = txtEmailAddress.Text;
            string subject = "CDONTS Exercise";
            string body = string.Format("Thank you {0} {1} for letting us send you this email.", toFirstName, toLastName);
            MailAddress fromAdd = new MailAddress(fromAddress, fromName);
            MailAddress toAdd = new MailAddress(toAddress);
            MailAddress ccAdd = new MailAddress(fromAddress);
            MailMessage msg = new MailMessage(fromAdd, toAdd);
            msg.Subject = subject;
            msg.Body = body;
            msg.IsBodyHtml = true;
            msg.Priority = MailPriority.High;

            SmtpClient client = new SmtpClient();

            string confirmMessage = "An email has been sent to you.";
            lblConfirmMessage.Text = confirmMessage;
            lblMessage.Text = body;

    Saturday, August 25, 2007 4:27 PM


  • User39490543 posted

     Presumably Hotmail is identifying your emails as spam and not sending them through?  See Fighting Junk E-Mail for some ideas on why Hotmail is not sending through your mail to Hotmail recipients.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 25, 2007 6:23 PM