Fix SMTP STARTTLS for Twisted >= 21.2.0
See original GitHub issueSummary
The Mail settings don’t have an option to choose a TLS version. Only to enforce upgrading connections to use SSL/TLS. Mail servers like smtp.office365.com dropped support for TLS1.0 and TLS1.1 and now require TLS1.2: https://techcommunity.microsoft.com/t5/exchange-team-blog/new-opt-in-endpoint-available-for-smtp-auth-clients-still/ba-p/2659652
It seems that scrapy mail doesn’t support TLS1.2. The error message (with MAIL_TLS = True
):
[scrapy.mail] Unable to send mail: To=['user@gmail.com'] Cc=[] Subject="Test" Attachs=0- 421 b'4.7.66 TLS 1.0 and 1.1 are not supported. Please upgrade/update your client to support TLS 1.2. Visit https://aka.ms/smtp_auth_tls. [AM6P194CA0047.EURP194.PROD.OUTLOOK.COM]'
Motivation
Without TLS1.2 it’s not possible anymore to send mails via smtp.office365.com. An option to use TLS1.2 would fix this issue
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
I’ll try to check this later
You can read my previous comment to get the answer.