Deno Email APIs for Sending Emails
Learn to Send and Receive Emails in Deno with MailSlurp: A Tutorial for the JavaScript Runtime created by NodeJS's inventor Ryan Dahl.
Deno is Node sorted - literally!
'node'.split('').sort().join('')
// deno
But, more seriously, Deno is a new runtime for Javascript that promises to fix some of the biggest problems with NodeJS. It was in fact created by Ryan Dahl who invented NodeJs itself.
Sending emails in Deno
MailSlurp is a free email API for sending and reading emails from disposable temp mailboxes. To use MailSlurp with deno simply import the package from Github.
import { InboxControllerApi } from 'https://raw.githubusercontent.com/mailslurp/mailslurp-client-deno/11.7.9/index.ts'
Creating inboxes
The Deno email library uses the same API as the NodeJS npm package.
// create a client
const apiKey = process.env.API_KEY ?? 'your-api-key';
const mailslurp = new MailSlurp({ apiKey });
// create an inbox
const inbox = await mailslurp.inboxController.createInbox({});
expect(inbox.emailAddress).toContain('@mailslurp');