The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available

-1

Please help me I am using this script..

Found the full code Here

 public void sendemail(int MemberId, DataTable Member, int rowNo)
    {
        MailMessage msgMail = new MailMessage();

        msgMail.To = Member.Rows[rowNo]["EmailID"].ToString();
        msgMail.From = "admin@auditionbollywood.com"; 
        msgMail.Subject = "Auditions BollyWood Account Expire";
        msgMail.BodyFormat = MailFormat.Text;
        StringBuilder sb = new StringBuilder();
        sb.AppendFormat("Hi !\n\n");
        sb.AppendFormat("Your Audition Bollywood Account has been expired.Please pay the payment for activation.\n");
        sb.AppendFormat("Click the below link to pay to activate your account\n");
        string link = string.Format("http://www.auditionbollywood.com/paymentrenewal.aspx?MemberId={0}", MemberId.ToString());
        sb.Append(link);
        sb.AppendFormat("\n\nThank You");
        msgMail.Body = sb.ToString();
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "mail.auditionbollywood.com");
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 587);
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2);
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "admin@auditionbollywood.com");
        msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "**********");
        SmtpMail.SmtpServer = "mail.auditionbollywood.com";
        SmtpMail.Send(msgMail);
    }
c#
asp.net
asked on Stack Overflow Jul 3, 2015 by Kushal Gupta • edited Jul 3, 2015 by Abdulla Nilam

2 Answers

0

The symbolic name for error code 0x80040217 is CDO_E_LOGON_FAILURE which has the following description:

The transport was unable to log on to the server.

You need to provide valid credentials to send using that SMTP server.

answered on Stack Overflow Jul 3, 2015 by Martin Liversage
0

The error means that the SMTP server rejected your e-mail.Reasons:

  1. information is incorrect

  2. SMTP server does not allow you to send e-mails externally.Check with SMTP administrator.

3.change email login security not to use the 2-step verification, but only a password.

answered on Stack Overflow Jul 3, 2015 by WannaLearn

User contributions licensed under CC BY-SA 3.0