I am implementing an email system in my application. It is working fine in local system but when i am moving to server (FTP) it throws an error shown in the below figure.
The client server system is from US.
Here is the code for email system i am writing.
StringBuilder sb = new StringBuilder();
string id1 = res1.ToList()[0].gid;
sb.AppendLine(txtbody.Text);
string str = sb.ToString();
MailMessage mail = new MailMessage();
mail.To.Add("[email protected]");
if (txtccaddress.Text != "")
{
mail.To.Add(txtccaddress.Text);
}
if (txtbcc.Text != "")
{
mail.To.Add(txtbcc.Text);
}
mail.From = new MailAddress("[email protected]");
mail.Subject = "New Guarantor Account Details";
string Body = "New Guarantor Account Details:" + "
";
Body += "Guarantor Email Address " + " : " + user + "
";
Body += "Guarantor gid" + " : " + id1 + "
" + "
";
if (txtccaddress.Text != "")
{
Body += "CC" + " : " + txtccaddress.Text;
}
Body += sb;
mail.Body = Body;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
mail.IsBodyHtml = true;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new System.Net.NetworkCredential("[email protected]", "bisteam123 ");
smtp.EnableSsl = true;
smtp.Send(mail);
Please Help me..It's urgent..
Thanks in advance....
Manish Kumar ChoudharyPosted Feb 26, 2015, 1:42 AM
Hema LathaPosted Feb 26, 2015, 1:37 AM
Manish Kumar ChoudharyPosted Feb 26, 2015, 1:31 AM