i am face some problem. we purchase a domain from google & create an (info@)email id on this domain but hosting is created on godaddy server & my website is uploaded on godaddy server. i want to send a feedback on my info id from our gmail account & i am using this code but the error is - falier sending mail
try
{
string strBody = "Feedback
" +
" Name : " + txtname.Text + "
" +
" Email ID : " + txteid.Text + "
" +
" Mobile : " + txtmob.Text + "
" +
" Question : " + txtq.Text + "
" +
"";
System.Net.Mail.MailMessage MyMailMessage = new
System.Net.Mail.MailMessage("[email protected]", "[email protected]", "Feedback", strBody);
MyMailMessage.IsBodyHtml = true;
System.Net.NetworkCredential mailAuthentication = new
System.Net.NetworkCredential("[email protected]", "Password");
System.Net.Mail.SmtpClient mailClient = new
System.Net.Mail.SmtpClient("smtp@gmail", 25);
mailClient.EnableSsl = true;
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = mailAuthentication;
mailClient.Send(MyMailMessage);
lblstatus.Text = "Email successfully sent.";
}
catch (Exception ex)
{
lblstatus.Text = "Send Email Failed." + ex.Message;
}