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);
}
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.
The error means that the SMTP server rejected your e-mail.Reasons:
information is incorrect
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.
User contributions licensed under CC BY-SA 3.0