I am using PB's downloadable MAILFILE.BAS as a model for my program. It will need to send (currently) 11 e-mails in a once-daily batch. Each mail will have about 2K of body text and a .pdf which will be about 25K. Each recipient will get a different .pdf, but the body text will be the same for everyone.
I can see three approaches I can take with this.
A)
Make a big array and MIMEify the .pdf's in advance. Connect to the SMTP server and iterate through the PDF array, sending each mail one at a time until done.
B)
Connect to the SMTP server and MIMEify each .pdf on the fly while I iterate through the recipient list. Disconnect after all messages sent.
C)
Prepare one message then connect to the SMTP server. Send the message and disconnect. Lather, rinse, repeat.
What is the best way to handle the situation?
I can see three approaches I can take with this.
A)
Make a big array and MIMEify the .pdf's in advance. Connect to the SMTP server and iterate through the PDF array, sending each mail one at a time until done.
B)
Connect to the SMTP server and MIMEify each .pdf on the fly while I iterate through the recipient list. Disconnect after all messages sent.
C)
Prepare one message then connect to the SMTP server. Send the message and disconnect. Lather, rinse, repeat.
What is the best way to handle the situation?
Comment