0

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;
    }  

1 Answer 1

1

You could try sending via the GoDaddy SMTP service that comes with your hosting. There's a lot of reasons you may be having this problem. A good place to start would be to check on the GoDaddy help and make sure there's no restrictions on opening SMTP sessions to other servers on your hosting. Next check with Gmail and see if other people have this problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .