Wraps Logo
← All changes
SDKSeptember 2026

Custom headers on send

Set message headers on send(), including the one-click unsubscribe Gmail and Yahoo require of bulk senders.

  • Pass a headers map to send() in @wraps.dev/email or @wraps.dev/email/workers. Set List-Unsubscribe to your unsubscribe URL and List-Unsubscribe-Post to List-Unsubscribe=One-Click to get the unsubscribe button in Gmail and Yahoo
  • Your unsubscribe URL must accept an HTTPS POST and unsubscribe without a confirmation page. Mail clients POST to it and link scanners only GET it, so a GET should not unsubscribe anyone
  • Headers are checked before anything is sent. Reserved names such as From, To, Subject and Reply-To throw a ValidationError, and so do values with line breaks or over SES’s length limits
  • On Node, a send with headers goes out through SendRawEmail. Roles deployed by Wraps already allow it. If you send with your own IAM policy, add ses:SendRawEmail

Email SDK v0.14.0

Read the docs →