I use the following code to send and email with an attachment
it works when sending a small attachment at 300 MB but when trying to send 4-5 MB file et times out.
so my question is, doanybody knows why
public void SendEmailSsl(MyMailMessage msg)
{
try{
System.Net.Mail.
MailMessage mm = new System.Net.Mail.MailMessage();mm.From =
new System.Net.Mail.MailAddress(msg.EmailFrom);mm.Body = msg.EmailMessage;
mm.Subject = msg.EmailSubject;
mm.IsBodyHtml =
false; foreach (object o in msg.EmailTo){
mm.To.Add(
new System.Net.Mail.MailAddress((string)o));}
foreach (object o in msg.Attachments){
mm.Attachments.Add(
new System.Net.Mail.Attachment((string)o));}
System.Net.Mail.
SmtpClient sc = new System.Net.Mail.SmtpClient(_serverSmtp, _portSmtp);sc.Credentials =
new NetworkCredential(_userSmtp, _passwordSmtp);sc.EnableSsl =
true;sc.DeliveryMethod = System.Net.Mail.
SmtpDeliveryMethod.Network;sc.Send(mm);
}
catch (Exception err) { throw new SmtpException(err.Message); }}

SMTP and gmail using SSL time out while sending file
Solitaire
lalle
I have another question.
when trying sending a mail using the code above with the timeout set to 20 minutes, i get instant timeouts i don't know why but i let it run and after 2-16 tries it get through and send the mail, but how come it starts with timeouts
regards
splyf
Hermes 68
ripern
Shuang Ma - ?爽