phpmailerHow do I configure the timeout settings for PHPMailer?
PHPMailer provides a lot of options to configure the timeout settings, such as:
Timeout: This is the timeout value for the socket connection. The default value is30seconds. This can be configured as follows:
$mail->Timeout=60;
SMTPOptions: This is an array of options for the underlying stream_context_create() call. It provides options for the stream_context, such as the timeout value. The default value is30seconds. This can be configured as follows:
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
),
'timeout' => 60
);
SMTPDebug: This is the debug output level. It can be set to1for simple debugging, or2to show more verbose debugging. The default value is0(no debugging). This can be configured as follows:
$mail->SMTPDebug = 2;
These options can be used to configure the timeout settings for PHPMailer.
Helpful links
More of Phpmailer
- How can I configure PHPMailer to work with GoDaddy?
- How can I set up PHPMailer to use Zimbra SMTP?
- How can I configure PHPMailer to support Polish characters?
- How can I use PHPMailer with XAMPP on a localhost?
- How do I determine which version of PHPMailer I'm using?
- How do I use PHPMailer to attach a ZIP file?
- How do I use PHPMailer to send an email to multiple addresses?
- How can I use PHPMailer in Yii 1?
- How can I use PHPMailer to send emails with a Yahoo account?
- How do I use the list-unsubscribe feature in PHPMailer?
See more codes...