Hello gurus
I am making a website for my friend. In the website i have included a contact us page in which a potential client would send an email. heres the address of the page if it helps, SNIP, it is constantly changing cause i am trying new techniques but the basic principles are the same. A name textfield, email textfield and question/comment textarea. So the user would send an email to an address, yahoo address, and get a reply. When i run the site through Visual web developer 2010 express it works flawlessly, sends the email just fine. However when i upload it, on a godaddy server, it dont do squat! I am using System.net.mail and have read that this package has a problem with SSL, something which i am new to also.
I do not have a SSL certificate on my godaddy domain, if that information helps.
here is my C# code
protected void Sub_Click(object sender, EventArgs e)
{
try
{
MailMessage mM = new MailMessage();
mM.From = new MailAddress("emailt@yahoo.com");
mM.To.Add("email@yahoo.com");
mM.Subject = txtEmail.Text;
mM.Body = txtName.Text + txtComment.InnerText;
mM.IsBodyHtml = true;
mM.Priority = MailPriority.High;
SmtpClient sC = new SmtpClient("smtp.mail.yahoo.com");
sC.Port = 587;
sC.Credentials = new NetworkCredential("email@yahoo.com", "password"); //username password
//sC.EnableSsl = true;
sC.Send(mM);
// = "Mail Send Successfully";
// lbReport.ForeColor = Color.Green;
}
catch (Exception ex)
{
// lbReport.Text = ex + "Mail Sending Fail's";
// lbReport.ForeColor = Color.Red;
}
}
I just want to know how i can send an email.
thank you