phpmailerHow do I disable STARTTLS in PHPMailer?
To disable STARTTLS in PHPMailer, you need to set SMTPSecure
to false
and SMTPAutoTLS
to false
in your mailer configuration.
Example code
$mail = new PHPMailer;
$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;
These two settings will disable the STARTTLS encryption in PHPMailer.
Code explanation
SMTPSecure
- This setting is used to set the encryption type of the connection. Setting it tofalse
will disable encryption.SMTPAutoTLS
- This setting is used to enable or disable TLS encryption automatically. Setting it tofalse
will disable it.
Helpful links
More of Phpmailer
- How can I use PHPMailer with React?
- How can I configure PHPMailer to work with GoDaddy?
- How can I configure PHPMailer to support Polish characters?
- How do I use PHPMailer with Yii2?
- How do I use PHPMailer with OAuth 2.0?
- How do I view the log for my PHPMailer emails?
- How can I use PHPMailer with Mailtrap?
- How do I use PHPMailer to attach a ZIP file?
- How can I set up PHPMailer to use Zimbra SMTP?
- How can I use PHPMailer in Yii 1?
See more codes...