HEXAQ : A friendly question - answer site for IT professionals

what is the logic for sending mail and message to my customer on my website in .net ??


0

To send email and confirmation message to customer on my site in .net language... please help me or give the reference of other site....

Â
asked
 


≡ Total 1 Answer

0

Check the following code. It is working fine on my live environment.

Please Note: I've my site hosted on Godaddy hosting environment sot the SMTP Client object code listed here is for Godaddy only.

System.Net.Mail.MailMessage MailObj = new System.Net.Mail.MailMessage();MailObj.Subject = "Subject Text";MailObj.Body = "Body Text";MailObj.IsBodyHtml = true;MailObj.From = "hexaqweb@gmail.com";MailObj.To.Add("receiveremail address");System.Net.Mail.SmtpClient smtp = new SmtpClient("relay-hosting.secureserver.net", 25);smtp.UseDefaultCredentials = false;smtp.Credentials = new NetworkCredential(SMTPUsername, SMTPPassword);smtp.Send(MailObj);

Hope this helps

Â
replied


Enter your reply here
Answer Preview:
Viewed: 522 times
Asked on: 9/2/2014
Permalink
Topics in this question
  3
Search Question
Similler Questions