smtplib, imaplib and ftplib
Send email (SMTP), read mailboxes (IMAP) and transfer files over FTP.
Intermediate
import smtplib
with smtplib.SMTP("smtp.example.com", 587) as s:
s.starttls(); s.login(user, password); s.send_message(msg)
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.