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]
FieldRequiredDescription
toYesRecipient email address
gatewayYesmailchannels or resend
userNoSender username (local part of From address)
hostNoSender domain
api_keyResend onlyYour Resend API key
fromNoFull sender email address (overrides user@host)
ccNoCC recipient
bccNoBCC 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.
← PreviousPushbulletNext →Webhook (Generic)