V
Vince
Can someone help me here please? My code keeps timing out on the very
last line. POP3 works fine.
The port is 465 and the host is pop.googlemail.com
Thank you
SmtpClient mysmtp = new SmtpClient();
if (useSSL) {
mysmtp.EnableSsl = true;
}
mysmtp.Port = port;
mysmtp.Host = host;
mysmtp.Credentials = new NetworkCredential(user, pass);
MailMessage mail = new MailMessage();
mail.To.Add(new MailAddress("(e-mail address removed)"));
mail.From = new MailAddress("(e-mail address removed)",
"Developers", System.Text.Encoding.UTF8);
mail.ReplyTo = new MailAddress("(e-mail address removed)");
mail.Subject = "Your moma";
mail.Attachments.Add(new Attachment(@"c:\sqmdata00.sqm"));
mail.DeliveryNotificationOptions =
DeliveryNotificationOptions.OnSuccess;
mysmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
mysmtp.Send(mail);
last line. POP3 works fine.
The port is 465 and the host is pop.googlemail.com
Thank you
SmtpClient mysmtp = new SmtpClient();
if (useSSL) {
mysmtp.EnableSsl = true;
}
mysmtp.Port = port;
mysmtp.Host = host;
mysmtp.Credentials = new NetworkCredential(user, pass);
MailMessage mail = new MailMessage();
mail.To.Add(new MailAddress("(e-mail address removed)"));
mail.From = new MailAddress("(e-mail address removed)",
"Developers", System.Text.Encoding.UTF8);
mail.ReplyTo = new MailAddress("(e-mail address removed)");
mail.Subject = "Your moma";
mail.Attachments.Add(new Attachment(@"c:\sqmdata00.sqm"));
mail.DeliveryNotificationOptions =
DeliveryNotificationOptions.OnSuccess;
mysmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
mysmtp.Send(mail);