Supports Web UI management and scheduled tasksοΌsend mail over http
1.0K
βοΈ If it helps you, please give a star.
For more information, please visit https://github.com/chuccp/http2smtpβ .
you can enter the management interface by opening a browser to http://127.0.0.1:12566.
docker run -p 12566:12566 -p 12567:12567 -it --rm cooge123/http2smtp
Added scheduled task functionality, which allows using cron expressions to periodically read results from an API or link and send emails. Supports configuring templates for JSON response APIs to convert JSON data into text for email content.
A gateway service that converts SMTP protocol to HTTP interfaces, helping developers:
Welcome to join WeChat group or Telegram for more suggestions.
WeChat group:
Telegram:
https://t.me/+JClG9_DojaM0ZGE1β
[core]
init = true ## Initialization switch, becomes true after initial configuration
cachePath = .cache ## Email attachment cache directory
dbType = sqlite ## Database type, supports sqlite and mysql
[sqlite]
filename = d-mail.db ## Database path
[manage]
port = 12566 ## Management port
username = 111111 ## Management username
password = 111111 ## Management password
webPath = web ## Management page path
[api]
port = 12567 ## API port
[mysql]
host = 127.0.0.1 ## Database address
port = 3306 ## Database port
dbname = d_mail ## Database name
charset = utf8 ## Database character set
username = root ## Database username
password = 123456 ## Database password
POST /sendMail
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Authorization token |
| subject | string | No | Email subject |
| content | string | Yes | Email content |
| recipients | []string | No | Additional recipient list |
| files | []File | No | Attachment file list |
Successful Response:
ok
JSON Format (with attachments)
curl -X POST 'http://127.0.0.1:12567/sendMail' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "{{token}}",
"subject": "test",
"content": "this is a test",
"recipients": ["[email protected]"],
"files": [
{
"name": "alert.log",
"data": "{{base64_content}}"
}
]
}'
Form Submission (with multiple attachments)
curl -X POST 'http://127.0.0.1:12567/sendMail' \
--form 'token={{token}}' \
--form 'subject=test' \
--form 'content=this is a test' \
--form '[email protected],[email protected]' \
--form 'files=@"/data/reports/sales.pdf"' \
--form 'files=@"/data/reports/expenses.xlsx"'
GET Request Example
curl 'http://127.0.0.1:12567/sendMail?token={{token}}&subject=test&content=this%20is%20a%20test&[email protected],[email protected]'

Content type
Image
Digest
sha256:8ed2a682aβ¦
Size
39.1 MB
Last updated
12 months ago
docker pull cooge123/http2smtp