how to send Email through my Own Domain
Using my server and domain name how can i send email with help of webmail
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Chandu KumawatPosted Nov 7, 2015, 2:07 AM
Kunal PatelPosted Nov 7, 2015, 12:46 AM
public void SendEmail()
{
try
{
string subject="your subject";
string ToEmail="to mail";
string bodyMsg="body";
MailMessage mail_message = new MailMessage(fromEmail, ToEmail);
SmtpClient client = new SmtpClient();
client.Port = Convert.ToInt32(ConfigurationSettings.AppSettings["PORT"].ToString());
client.EnableSsl = false;
client.UseDefaultCredentials = false;
System.Net.NetworkCredential basicAuthenticationInfo = new
System.Net.NetworkCredential(ConfigurationSettings.AppSettings["emailUsername"].ToString(), ConfigurationSettings.AppSettings["emailPassword"].ToString());
client.Host = ConfigurationSettings.AppSettings["SMTP"].ToString();
mail_message.Subject = subject;
mail_message.Body = bodyMsg;
mail_message.IsBodyHtml = true;
client.Send(mail_message);
}
catch (Exception ex)
{
throw ex;
}
}
Raja TPosted Nov 6, 2015, 7:33 AM
Raja TPosted Nov 6, 2015, 7:31 AM
Chandu KumawatPosted Nov 6, 2015, 7:29 AM
Raja TPosted Nov 6, 2015, 7:23 AM