sendmail by flask api
Currently only supports SSL PORT for mail_server ( Gmail SMTP port (SSL): 465)
- ${MAIL_USER} default is None
- ${MAIL_PASS} default is None
- ${MAIL_SERVER} default is smtp.gmail.com
- ${MAIL_PORT} default is 465
necessary
- receiver , default = "" (receiver mail address)
- mail , default = {env.MAIL_USER} (sender mail address)
- pass , default = {env.MAIL_PASS} (sender mail pass)
- server , default = {env.MAIL_SERVER} (sender mail server)
- port , default = {env.MAIL_PORT} (sender mail port)
optional
- subject , default = "default subject" (mail subject)
- message , default = "hello world [Default]"(mail body) [Base64 or plain text]
- attach_link , default = "" (only one attachment in a link)
- Bcc , default = "" (mail blind carbon copy address)
- cc , default = "" (mail carbon copy address)
- simple use
http -f POST http{s}://{ip or hostname}:{port}/send receiver="[email protected],[email protected]" \
subject="hello subject" \
body="hello body"
- cc , bcc and send a attachment
http -f POST http{s}://{ip or hostname}:{port}/send receiver="[email protected]" \
cc="[email protected]" \
Bcc="[email protected]" \
attach_link="https://transfer.sh/T3y2FO/hello.txt"
- use own smtp mail
http -f POST http{s}://{ip or hostname}:{port}/send receiver="[email protected],[email protected]" \
mail="[email protected]" \
pass="xxx" \
server="smtp.gmail.com"
port="465"
Time flies, the way I do without enabling less secured app is making a password for specific app
- Step one: enable Google 2FA
- Step two: create an Google app-specific password
After this, use the sixteen digits password as mail SMTP password, enjoy!
only support us and ca phone number
mailto: [email protected]