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 tofalsewill disable encryption.SMTPAutoTLS- This setting is used to enable or disable TLS encryption automatically. Setting it tofalsewill disable it.
Helpful links
More of Phpmailer
- How do I use PHPMailer to attach a ZIP file?
- How do I use PHPMailer to encode emails in UTF-8?
- How can I set up PHPMailer to use Zimbra SMTP?
- How can I configure PHPMailer to support Polish characters?
- How do I update PHPMailer?
- How do I set the return path in PHPMailer?
- How do I configure PHPmailer to use Zoho SMTP?
- How do I install PHPMailer using Composer?
- How can I use PHPMailer to prevent junk mail?
See more codes...