Chilkat Mail methods are stateless with SMTP / POP3 connections

Question:

If I want to send multiple emails with the one SMTP connect and disconnect do I have to use SendBundle or can I establish a connection with VerifySMTPConnection and the disconnect later after using SendMail or does SendMail disconnect after a successful send?

Answer:

The Chilkat Mail calls are stateless in that connections to SMTP / POP3 servers are opened and closed in a single method call.

The SendBundle method allows you to send multiple emails in one SMTP connection. The VerifySmtpConnection method follows the same rules for statelessness - it simply checks to see if a connection can be made to the SMTP server and then disconnects. This method might be used to help diagnose a failure -- you can discern between a network connection problem and a login/password problem by calling both VerifySmtpConnection and VerifySmtpLogin.

Because the calls are stateless, you'll find methods such as FetchMultiple or DeleteMultiple to work with sets of UIDLs on POP3 servers in one POP3 session. You would want to use these methods instead of looping over UIDLs and calling DeleteByUidl for each (as an example).