QQ Mail SMTP Error 550: Fixing 'The From header is missing or invalid' in Python
When using QQ Mail's SMTP server to send emails via Python's smtplib, you may encounter the error:
(550, b'The "From" header is missing or invalid. Please follow RFC5322, RFC2047, RFC822 standard protocol. https://service.mail.qq.com/detail/124/995.')
This typically happens when the From header in the email is incorrectly encoded.
Pr ...
Posted on Thu, 28 May 2026 17:43:18 +0000 by .evo.
Sending Email with Python via SMTP and SSL
import smtplib
from email.mime.text import MIMEText
sender = 'alice@example.com' # QQ mailbox address
auth_code = 'your-16-char-auth-code' # generated in QQ Mail settings
recipients = ['bob@example.com', 'carol@example.com']
title = 'Test message from Python'
body = '''
Hello,
This is a plain-text message sent with smtplib.
Regards, ...
Posted on Mon, 25 May 2026 18:51:37 +0000 by joquius