You can use below the function according to your need.
you can refer code in Vb language.
private void send_form()
{
try
{
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(“FROM email id here”, TO email id here, “Your Subject Here”,”Your TEXT here”);
//Proper Authentication Details need to be passed when sending email from gmail System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential(“your email/login id here”, “password here”);
//Smtp Mail server of Gmail is “smpt.gmail.com” and its port no. 587 System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient(“smtp.gmail.com”, 587);
//Enable SSL
//Gmail is SSL certify so that why we need to set Enabelssl=true
READ MORE »


Recent Comments