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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Raja TRank #685 · 3.5K reputationPosted Nov 6, 2015, 2:23 AM EST
Chandu KumawatRank #1,449 · 1.1K reputationPosted Nov 6, 2015, 2:29 AM EST
Raja TRank #685 · 3.5K reputationPosted Nov 6, 2015, 2:31 AM EST
Raja TRank #685 · 3.5K reputationPosted Nov 6, 2015, 2:33 AM EST
Kunal PatelRank #1,359 · 1.2K reputationPosted Nov 6, 2015, 7:46 PM EST
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;
}
}
Chandu KumawatRank #1,449 · 1.1K reputationPosted Nov 6, 2015, 9:07 PM EST