M
Muhammad Deeraf
I am using following code to send an email to a gmail account.
MailMessage mm = new MailMessage("(e-mail address removed)","(e-mail address removed)","Subject: be careful","hi target, you are going to miss the train");
NetworkCredential nc = new NetworkCredential("(e-mail address removed)","myaccountpassword","http://www.gmail.com");
SmtpClient sc = new SmtpClient("smtp.gmail.com",587);
sc.Credential = nc;
sc.Send(mm);
The above code doesn't raise any exception but take along time at last line, and when i check target account inbox, there is no email.
Please help!
MailMessage mm = new MailMessage("(e-mail address removed)","(e-mail address removed)","Subject: be careful","hi target, you are going to miss the train");
NetworkCredential nc = new NetworkCredential("(e-mail address removed)","myaccountpassword","http://www.gmail.com");
SmtpClient sc = new SmtpClient("smtp.gmail.com",587);
sc.Credential = nc;
sc.Send(mm);
The above code doesn't raise any exception but take along time at last line, and when i check target account inbox, there is no email.
Please help!