Shoutbox.net is a Developer API designed to send transactional emails at scale. This guide will explain how you can seamlessly switch your email service from Resend to Shoutbox.net without changing a single line of code in your application.
Shoutbox.net is a powerful API that enables developers to send transactional emails efficiently and at scale. It provides robust features, including support for attachments, custom headers, and more, ensuring reliable email delivery for your applications.
Resend is another email API service that allows developers to send emails programmatically. It provides a straightforward API for sending emails.
If you are already using Resend in your application, you can switch to Shoutbox.net without changing any code. By setting the RESEND_BASE_URL
environment variable to Shoutbox.net's API endpoint, your existing Resend code will run seamlessly on Shoutbox.net.
To switch from Resend to Shoutbox.net, export the RESEND_BASE_URL
environment variable in your environment:
export RESEND_BASE_URL=https://api.shoutbox.net
You need to install the resend
package to use the Resend API. This package can be installed using npm, yarn, or pnpm.
npm install resend
yarn add resend
pnpm add resend
Here is an example of how to send an email using Resend. This code will work with Shoutbox.net by setting the RESEND_BASE_URL
environment variable as described above:
import { Resend } from "resend";
const resend = new Resend("MY_API_KEY");
(async () => {
console.log(
await resend.emails.send({
from: "no-reply@shoutbox.net",
to: "frank@example.com",
subject: "hello world",
text: "it works!",
})
);
})();
-
Set Up the Environment Variable
Before running the example, set the
RESEND_BASE_URL
environment variable to point to Shoutbox.net:export RESEND_BASE_URL=https://api.shoutbox.net
-
Run the Code
Execute the JavaScript file containing the example code:
node example.js
Replace
example.js
with the name of your JavaScript file.
This project is licensed under the MIT License. See the LICENSE file for more details.
By using the RESEND_BASE_URL
environment variable, you can easily switch your email service from Resend to Shoutbox.net without modifying your existing code. This allows you to leverage the robust features of Shoutbox.net for your email delivery needs. For more information on Shoutbox.net and its capabilities, refer to the official documentation.