charmbracelet / pop

Send emails from your terminal 📬
MIT License
2.36k stars 49 forks source link

SMTP Support #17

Closed maaslalani closed 1 year ago

maaslalani commented 1 year ago

Adds SMTP support for pop.

Configured by environment variables:

export POP_SMTP_HOST=smtp.gmail.com
export POP_SMTP_PORT=587
export POP_SMTP_USERNAME=...
export POP_SMTP_PASSWORD=...

If @gmail.com is the suffix of the POP_SMTP_USERNAME then we will automatically set the default of the HOST and PORT to smtp.gmail.com and 587.

meowgorithm commented 1 year ago

I believe port 587 is now the de-facto standard SMTP port, so perhaps it's worth defaulting to that regardless of whether or not gmail is being used?

maaslalani commented 1 year ago

I believe port 587 is now the de-facto standard SMTP port, so perhaps it's worth defaulting to that regardless of whether or not gmail is being used?

Ah nice, good point. Will make it the default 👍