i try to send me an mail via c# but everytime it comes an ssl error. can you tell me whats wrong?
Thank you
SmtpClient mail = new SmtpClient();
MailMessage msg = new MailMessage("address", "address");
msg.Subject = "send data";
msg.Body = "Stuff";
mail.Credentials = new NetworkCredential("username", "pw");
mail.Host = "smtp.googlemail.com";
Attachment data = new Attachment(path1);
msg.Attachments.Add(data);
Attachment data2 = new Attachment(path2);
msg.Attachments.Add(data2);
Attachment data3 = new Attachment(path3);
msg.Attachments.Add(data3);
mail.Send(msg);
1 Answer