Skip to content

Latest commit

 

History

History
145 lines (97 loc) · 2.85 KB

README.md

File metadata and controls

145 lines (97 loc) · 2.85 KB

Recipients

Add to Suppression List

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.addToSuppressionList({
  domain_id: "...",
  patterns: [],: "...",
  recipients: [],
});
import { addToSuppressionList } from "@nuro.dev/mailersend.ts";

const result = await addToSuppressionList("API_KEY", {
  domain_id: "...",
  patterns: [],: "...",
  recipients: [],
});

List Recipients

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.listRecipients({
  // ...
});
import { listRecipients } from "@nuro.dev/mailersend.ts";

const result = await listRecipients("API_KEY", {
  // ...
});

Delete From Suppression List

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.deleteFromSuppressionList({
  all: true,
  // OR
  ids: ["..."],
});
import { deleteFromSuppressionList } from "@nuro.dev/mailersend.ts";

const result = await deleteFromSuppressionList("API_KEY", {
  all: true,
  // OR
  ids: ["..."],
});

Delete Recipient

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.deleteRecipient("RECIPIENT_ID");
import { deleteRecipient } from "@nuro.dev/mailersend.ts";

const result = await deleteRecipient("API_KEY", "RECIPIENT_ID");

Get Recipient by ID

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.recipientById("RECIPIENT_ID");
import { recipientById } from "@nuro.dev/mailersend.ts";

const result = await recipientById("API_KEY", "RECIPIENT_ID");

Get Suppression List

Official Documentation


import { Client } from "@nuro.dev/mailersend.ts";

const client = new Client("...");

const result = await client.suppressionList({
  // ...
});
import { suppressionList } from "@nuro.dev/mailersend.ts";

const result = await suppressionList("API_KEY", {
  // ...
});