Gmail API
Gmail API sends mail with smtplib / email.message, or a Gmail API. You need host, port, login. Never hard-code passwords in source — use env vars.
Classroom: show the Message structure (From, To, Subject, body). Real send needs credentials; the example prints the message text so it always runs.
Output — three header lines. Gmail API sends the same fields with OAuth — not a password in code.
Exam tip
Parts of an email + never commit passwords.