unsubscribe
Stops bulk sender emails by reading message headers and either executing one-click requests, drafting mail requests, or returning opt-out links; default mode only reports available options.
Instructions
Unsubscribe from the bulk sender of a message (ref or raw id).
Reads the message's List-Unsubscribe headers and:
method "one-click": with execute=True, performs the RFC 8058 one-click POST and returns the HTTP status — no browser needed.
method "mailto": with execute=True, creates a DRAFT unsubscribe email to the sender's unsubscribe address for you to send (our mail scope can create but not send mail).
method "weblink": returns the URL for you to open in a browser; not auto-fetched, since blindly GETting links embedded in email is unsafe.
With execute=False (default) it only reports the available method/target so you can decide. Caveat: unsubscribing confirms your address is live, so do it for legitimate senders — for actual spam, prefer delete/block instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| execute | No | ||
| message_id | Yes |