Sign inSign up

darkmagician/httpmail

By darkmagician

•Updated about 5 years ago

Image
0

103

darkmagician/httpmail repository overview

⁠httpmail

⁠Introduction

It is a tool to convert HITTP request to SMTP message.

It is another version of https://sct.ftqq.com/sendkey⁠. It uses the similar HTTP interface, but instead of wechat notification, it sends the message to SMTP as email. We can configure the QQ mail in the wechat. https://service.mail.qq.com/cgi-bin/help?id=47&no=1000974&subtype=1⁠

⁠Configuration

The configuration file is located under the followings:

config/httpmail.json
⁠Tokens

These allowed tokens are accepted.

	"tokens": ["abc","abc2"]

⁠HTTP Server
	"http": {
		"port": 4000,
		"host": "127.0.0.1",
		"ssl": {
			"enabled": false,
			"cert": "",
			"key": ""
		}
	}

NOTE:

  • cert and key are used for HTTPS. They are used when ssl is enabled.
  • The location of cert and key is the relative location to the parent folder.
⁠SMTP

	"smtp": {
		"ssl": true,
		"server": "smtp.qq.com",
		"user": "[email protected]",
		"pass": "xxxxxxxxxx",
		"from": "[email protected]",
		"to": "[email protected]"
	}

⁠Usage

⁠How to Setup
pip install -r requirements.txt
⁠How to Run
python server.py
⁠How to Call
https://<host>/<token>.send?title=messagetitle&desp=messagecontent&sender=senderId

NOTE:

  • title and desp are required
  • sender is optional
⁠How to Run in Docker
docker run -p 127.0.0.1:3333:3333/tcp -v <config folder>:/app/config -v <logs folder>:/app/log 

Tag summary

Content type

Image

Digest

Size

45.6 MB

Last updated

about 5 years ago

docker pull darkmagician/httpmail