Gmail / Send a new email
SDK Reference
Services
Messages
Labels
POST

Send a new email

Sends a new email from the connected Gmail account. Requires the Send Email scope.

SDK methodclient.gmail.send()
Parameters
NameTypeDescription
torequired
string
Recipient email address. Accepts a comma-separated list for multiple recipients.
subjectrequired
string
Subject line of the email.
bodyrequired
string
Plain text or HTML body of the email.
cc
string
Carbon copy recipients (optional).
Code example
import { Sweeftcode } from "sweeftcode-sdk";

const client = new Sweeftcode("your-api-key");

await client.gmail.send({
  to:      "user@example.com",
  subject: "Hello from Sweeftcode",
  body:    "This email was sent via the Sweeftcode SDK.",
  cc:      "manager@example.com", // optional
});
Required scope: GMAIL_SEND
Grant the GMAIL_SEND OAuth scope when connecting this integration in your dashboard.
// UNIFIED RESPONSE FORMAT

Every Sweeftcode method returns a consistent structure regardless of the underlying provider. Errors, pagination, and status fields follow the same shape across all services.

Quick install
npm install sweeftcode-sdk

One SDK. Every API. No separate installs, no credential juggling. Get early access →