Skip to content

Sending Email (Beta)

General information:

This is currently in beta but in a useable state, it is being provided as a best effort feature, changes might happen to it.

How To

  • Create a bin, there is a new query / header called 'lower' which will make the token have only lower case letters and numbers. This is needed as when sending an email the letter case is not always preserved for subdomains.
curl 'https://webhookbin.net/v1/makebin?private=both&lower=true'
  • email parts: [email protected]
    • user: can be anything as long as it conforms to standard email limits
    • binauth: the token for the bin if it is a private bin, omit if bin isn't private
    • binid: the id of the bin
    • domain: use webhookbin.net unless you have your own relay
{
    "binid": "2e6908ad-25b2-40cc-9d25-6c53a63d97bd",
    "link": "https://webhookbin.net/v1/bin/2e6908ad-25b2-40cc-9d25-6c53a63d97bd",
    "postlink": "https://webhookbin.net/v1/bin/2e6908ad-25b2-40cc-9d25-6c53a63d97bd?Binauth=0x5h6vvpfzmvt41qv1tckbu2uazgeos4x7d2h6urqry",
    "getlink": "https://webhookbin.net/v1/bin/2e6908ad-25b2-40cc-9d25-6c53a63d97bd?Binauth=0x5h6vvpfzmvt41qv1tckbu2uazgeos4x7d2h6urqry",
    "token": "0x5h6vvpfzmvt41qv1tckbu2uazgeos4x7d2h6urqry",
    "header": {
        "Binauth": "0x5h6vvpfzmvt41qv1tckbu2uazgeos4x7d2h6urqry"
}

Would make the email:

someuser@0x5h6vvpfzmvt41qv1tckbu2uazgeos4x7d2h6urqry.2e6908ad-25b2-40cc-9d25-6c53a63d97bd.webhookbin.net
While it is a long email address, it is well within the email spec.

Email Response

Currently, there is no response if the bin id is wrong or if the binauth is wrong, all emails are just accepted and if something doesn't match the message is discarded. This might be changed at a later time and would like some feedback on this setup.

Bin Message

{
    "binid": "5a7f1882-60ae-470a-aa69-4bcc4df8feba",
    "messid": "a011c509-7abe-47b8-8801-0d37c038982b",
    "received": 1723525032,
    "headers": {
        "Host": "webhookbin.net",
        "Connection": "close",
        "Content-Length": "717",
        "User-Agent": "python-requests/2.32.3",
        "Accept": "*/*",
        "Accept-Encoding": "gzip, br",
        "Cdn-Loop": "cloudflare",
        "Cf-Ipcountry": "US",
        "Cf-Ray": "8b261f7ea1d51007-LAX",
        "Cf-Visitor": "{\"scheme\":\"https\"}",
        "Cf-Warp-Tag-Id": "487c265b-4ed8-44da-b081-86db9b0f6e66",
        "Content-Type": "application/json",
        "X-Forwarded-Proto": "https"
    },
    "content": {
        "from": "Info <[email protected]>",
        "emailuser": "someuser",
        "bodyplain": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus malesuada,\r\nmassa non volutpat elementum, sem diam maximus nulla, a aliquet nulla nibh\r\nnec odio. Duis.\r\n",
        "bodyhtml": "<div dir=3D\"ltr\"><p style=3D\"margin:0px 0px 15px;padding:0px;text-align:jus=\r\ntify;color:rgb(0,0,0);font-family:&quot;Open Sans&quot;,Arial,sans-serif;fo=\r\nnt-size:14px\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Viva=\r\nmus malesuada, massa non volutpat elementum, sem diam maximus nulla, a aliq=\r\nuet nulla nibh nec odio. Duis.<br></p></div>\r\n",
        "subject": "This is a subject",
        "date": "Tue, 13 Aug 2024 00:56:59 -0400"
    }
}