Glossary

smtplib connection modes:

`SMTP_SSL("smtp.gmail.com", 465)` — encrypted from the start (Gmail standard) - `SMTP("smtp.gmail.com", 587)` + `.starttls()` — starts unencrypted, upgrades (Outlook/Microsoft standard) - Always use a `with` statement so the connection closes cleanly

Learn More

Related Terms