Docs / Services

Email

Send email notifications via an HTTP email gateway. Raw SMTP is not supported in Web API environments, so notifly uses gateways: MailChannels (free on Cloudflare Workers) or Resend (free tier available).

URL format

scheme
mailto://user:gateway@host?to=recipient@example.com[&api_key=xxx][&from=sender@domain]
Field Required Description
to Yes Recipient email address
gateway Yes mailchannels or resend
user No Sender username (local part of From address)
host No Sender domain
api_key Resend only Your Resend API key
from No Full sender email address (overrides user@host)
cc No CC recipient
bcc No BCC recipient

MailChannels example (Cloudflare Workers)

typescript
import { notify } from '@ambersecurityinc/notifly';

await notify(
  {
    urls: [
      'mailto://alerts:mailchannels@mycompany.com?to=team@mycompany.com'
    ],
  },
  { title: 'Deploy Alert', body: 'Production deploy completed', type: 'success' }
);

Resend example

typescript
await notify(
  {
    urls: [
      'mailto://alerts:resend@mycompany.com?to=team@mycompany.com&api_key=re_xxxxxxxxxx'
    ],
  },
  { title: 'Alert', body: 'Something happened', type: 'warning' }
);

Getting credentials

MailChannels

MailChannels is available for free on Cloudflare Workers with no additional configuration — it's baked into the Cloudflare network. See the Cloudflare Workers guide for setup details.

Resend

  1. Sign up at resend.com.
  2. Go to API KeysCreate API Key.
  3. Add your sending domain and verify DNS records.
  4. Copy the API key (starts with re_).

Quirks & limitations

  • Raw SMTP (ports 25/465/587) is blocked in most serverless environments.
  • MailChannels only works from Cloudflare Workers networks.
  • Resend requires a verified sending domain for production use.
← Previous Pushbullet Next → Webhook (Generic)