MIME
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
- https://www.iana.org/assignments/media-types/media-types.xhtml#application
SMTP
SMTP (Simple mail transfer protocol) is used instead of HTTP to send emails... dumb
- generally uses port 465 or 587
- dictates how email messages should be formatted/encripted/relayed between mail servers
$ import smtplib
$ smtp = smtplib.SMTP('smtp.gmail.com', 587)
$ smtp.ehlo()
$ smtp.ttls() # create secure connection
# CREDENTIALS
# Create app password (same username)
# https://support.google.com/mail/?p=InvalidSecondFactor
$ smtpObj.login('ab18gu@gmail.com', '<app-password>')
$ smtpObj.sendmail('ab18gu@gmail.com', 'you@gmail.com', 'Subject: This is automated\nweird...')
$ smtpObj.quit()
GMAIL
- for gmail: https://developers.google.com/workspace/gmail/imap/imap-smtp
- outgoing SMTP server, smtp.gmail.com, supports TLS,
port 587
- outgoing SMTP server, smtp.gmail.com, supports TLS,
- https://support.google.com/mail/answer/22839?hl=en#zippy=%2Cyou-have-reached-a-limit-for-sending-mail
IMAP
IMAP (Internet Message Access Protocol) used to recieve emails... dumb
- generally listens on port 143
In addition to these, some security protocols are embedded into these protocols.