Hi all,
thanks for the quick reply!
@jelo - it does indeed close the connection after each email (see debug details):
Code:
Invitation sent to:1: Recipient 1 (recipient1@domain.com)
SMTP debug output:
2019-10-21 19:03:46 SERVER -> CLIENT: 220 mail.domain.com Microsoft ESMTP MAIL Service, Version: 7.0.6001.18000 ready at Mon, 21 Oct 2019 20:03:46 +0100
2019-10-21 19:03:46 CLIENT -> SERVER: EHLO senderhost.domain.com
2019-10-21 19:03:46 SERVER -> CLIENT: 250-mail.domain.com Hello [10.198.34.175]
250-TURN
250-SIZE 2097152
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
2019-10-21 19:03:46 CLIENT -> SERVER: MAIL FROM:<survey@domain.com>
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.1.0 survey@domain.com....Sender OK
2019-10-21 19:03:46 CLIENT -> SERVER: RCPT TO:<srecipient1@domain.com>
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.1.5 recipient1@domain.com
2019-10-21 19:03:46 CLIENT -> SERVER: DATA
2019-10-21 19:03:46 SERVER -> CLIENT: 354 Start mail input; end with <CRLF>.<CRLF>
BODY REMOVED
2019-10-21 19:03:46 CLIENT -> SERVER: .
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.6.0 <80be62354285e767a248bb011be326e6@senderhost.domain.com> Queued mail for delivery
2019-10-21 19:03:46 CLIENT -> SERVER: QUIT
2019-10-21 19:03:46 SERVER -> CLIENT: 221 2.0.0 mail.domain.com Service closing transmission channel
Invitation sent to: 2: Recipient 2 (recipient2@domain.com)
SMTP debug output:
2019-10-21 19:03:46 SERVER -> CLIENT: 220 mail.domain.com Microsoft ESMTP MAIL Service, Version: 7.0.6001.18000 ready at Mon, 21 Oct 2019 20:03:46 +0100
2019-10-21 19:03:46 CLIENT -> SERVER: EHLO senderhost.domain.com
2019-10-21 19:03:46 SERVER -> CLIENT: 250-mail.domain.com Hello [10.198.34.175]
250-TURN
250-SIZE 2097152
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250 OK
2019-10-21 19:03:46 CLIENT -> SERVER: MAIL FROM:<survey@domain.com>
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.1.0 survey@domain.com....Sender OK
2019-10-21 19:03:46 CLIENT -> SERVER: RCPT TO:<recipient2@domain.com>
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.1.5 recipient2@domain.com
2019-10-21 19:03:46 CLIENT -> SERVER: DATA
2019-10-21 19:03:46 SERVER -> CLIENT: 354 Start mail input; end with <CRLF>.<CRLF>
BODY REMOVED
2019-10-21 19:03:46 CLIENT -> SERVER: .
2019-10-21 19:03:46 SERVER -> CLIENT: 250 2.6.0 <4d0b80f6030962bcd78215a28fcf2d5a@senderhost.domain.com> Queued mail for delivery
2019-10-21 19:03:46 CLIENT -> SERVER: QUIT
2019-10-21 19:03:46 SERVER -> CLIENT: 221 2.0.0 mail.domain.com Service closing transmission channel
All emails were sent.
@DenisChenu:
We can't change out SMTP server settings - it will be a long road before that happens...
But thank you for your suggestions!
Would I need both 1. and 2. or would 2 just be sufficient?
I see in a topic on stackoverflow re item 2 (see:
this link
):
Code:
Just set to true the SMTPKeepAlive property and after the bulk sending, call implicitly the SmtpClose() method.
$phpMailer = New PHPMailer();
$phpMailer->isSMTP();
$phpMailer->SMTPKeepAlive = true;
for ( ... ) {
// Send your emails right away
[ ... ]
}
$phpMailer->SmtpClose();
so I'll have to investigate where to add this "$phpMailer->SmtpClose();"
Thanks,
B.