restmail.net

用于短暂电子邮件地址的 REST 邮件服务器。「a REST only mail server for ephemeral email addresses」

Github星跟蹤圖

Email addresses for testing

Build Status

Have you ever wanted to write an automated test of a service that
sends email? If you have, you might have wanted an email address that
you can check using a simple REST service that returns JSON...

..that's what restmail.net is.

overview

restmail.net is an email server with a REST API. Any time an
email is sent to a @restmail.net address, the email address springs
into existence and the message is stored (with a max of 10 emails per
"user"). You can query the restmail API to check the email of any
user, and you can also delete outstanding messages via the API.

This lets you test services that deliver email.

By default, emails are deleted after one day. You can change this
by modifying the expireAfter parameter in config.js. Set it to
0 for no auto-deletion, in which case you will want to keep an
eye on your redis database size.

security?

All mail sent to restmail email addresses is completely public. anyone
may delete the messages associated with any user. This service is
wide open. If that won't do, you should fork and deploy your own
instance of restmail, and add sekrets and stuff.

the API

DELETE /mail/<user>

Delete all of the mail for the named user (where user is the user
portion of the email address, not including @restmail.net).

Returns 200 on success.

GET /mail/<user>

Returns all mail for the specified user, as an array of JSON blobs,
with the newest messages first. Here's example output (with lots of
fields stripped out):

[
  {
    "headers": {
      "date": "Fri, 11 May 2012 14:44:37 -0600",
      "mime-version": "1.0 (Apple Message framework v1257)",
    },
    "from": [ {
      "address": "lloyd@example.com",
      "name": "Lloyd Hilaiel"
    } ],
    "to": [ {
      "address": "test@restmail.net",
      "name": ""
    } ],
    "subject": "this is my first message",
    "text": "it is very pretty.\n"
  }, {
    "headers": {
      "date": "Fri, 11 May 2012 14:44:52 -0600",
      "mime-version": "1.0 (Apple Message framework v1257)",
    },
    "from": [ {
      "address": "lloyd@example.com",
      "name": "Lloyd Hilaiel"
    } ],
    "to": [ {
      "address": "test@restmail.net",
      "name": ""
    } ],
    "subject": "this is my second message",
    "text": "it's pretty awesome too.\n"
  }
]

restmail on your domain (deprecated; the public restmail.net is now resricted).

You can use restmail from custom domains: Just set restmail as your mail exchanger:

$ dig -t <my domain>
<my domain>            900     IN      MX      20 restmail.net.

And fetch mail with the full email address:

GET /mail/<user>@<my domain>

done!

主要指標

概覽
名稱與所有者mozilla/restmail.net
主編程語言JavaScript
編程語言JavaScript (語言數: 5)
平台
許可證Mozilla Public License 2.0
所有者活动
創建於2012-05-08 22:24:15
推送於2025-04-10 14:28:59
最后一次提交2025-04-10 07:28:58
發布數3
最新版本名稱1.2 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數113
關注者數33
派生數29
提交數169
已啟用問題?
問題數19
打開的問題數0
拉請求數60
打開的拉請求數6
關閉的拉請求數91
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?