MailAttachment too slow

  • Thread starter Erick Daniel Tinajero
  • Start date
E

Erick Daniel Tinajero

Hi all:

I am trying to do an automatic email sending process. I get some data from a
database to know which files to send, then I add them through a Do ... Loop
to my System.Web.MailMessage object using:

mail.Attachments.Add(New MailAttachment("File path goes here"))

When the loop finished, I do a send like this:

SmtpMail.SmtpServer = "smtpserver"
SmtpMail.Send (mail)

The whole process runs ok, but its incredibly slow. It usually takes 2
minutes or more, and I think its too slow for such a process. Have anyone
experienced this behavior too? If yes, could anyone help me? The code is
right, but the processing is just unacceptable. Thank you.
 
E

Erick Daniel Tinajero

Nevermind, I was relying the email, and the SMTP server was trying to verify
the authenticy of the source email. That was taking too many time. Thanks.

P.S. Do not try to rely. It takes too much time :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,332
Latest member
LeesaButts

Latest Threads

Top