B
blini
//create the mail message
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress("(e-mail address removed)");
mail.To.Add("(e-mail address removed)");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";
//send the message
SmtpClient smtp = new SmtpClient("smtp.gmail.com");
smtp.EnableSsl = false;
//to authenticate we set the username and password
properites on the SmtpClient
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new
NetworkCredential("gmailLogin","gmailPassword","localhost");
smtp.Send(mail);
it´s ok??
why it does not send the email??
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress("(e-mail address removed)");
mail.To.Add("(e-mail address removed)");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";
//send the message
SmtpClient smtp = new SmtpClient("smtp.gmail.com");
smtp.EnableSsl = false;
//to authenticate we set the username and password
properites on the SmtpClient
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new
NetworkCredential("gmailLogin","gmailPassword","localhost");
smtp.Send(mail);
it´s ok??
why it does not send the email??