If you are using a plugin to send email through a service such as Mailchimp or Amazon SES, and the plugin supports batch delivery, then it may require only one connection. Otherwise, it will require a separate connection for every discrete email being sent.
I am thinking only of wp_mail directly towards the server. I’ll have to code something new then 😊
WordPress uses an email package called PHPMailer. PHPMailer has a large number of options/features that aren’t used by WordPress core, but they can be used by plugins. Here’s some code on the PHPMailer site that demonstrates the use of SMTP keepalive to send emails to a mailing list:
https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps
This method used might be possible with a WordPress plugin that hooks a specific action in the wp_mail()
function. However, I suspect that you might need to bypass wp_mail()
and use PHPMailer directly to send the emails.