Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@vcapretz/resend
Advanced tools
Node.js library for the Resend API.
npm install resend
# or
yarn add resend
Send email with:
First, you need to get an API key, which is available in the Resend Dashboard.
import { Resend } from 'resend';
const resend = new Resend('re_123456789');
Send your first email:
await resend.emails.send({
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
text: 'it works!',
});
Send an email custom HTML content:
await resend.emails.send({
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
html: '<strong>it works!</strong>',
});
Start by creating your email template as a React component.
import React from 'react';
export default function EmailTemplate(props) {
const { firstName, product } = props;
return (
<div>
<h1>Welcome, {firstName}!</h1>
<p>Thanks for trying {product}. We’re thrilled to have you on board.</p>
</div>
);
}
Then import the template component and pass it to the react
property.
import EmailTemplate from '../components/EmailTemplate';
await resend.emails.send({
from: 'you@example.com',
to: 'user@gmail.com',
subject: 'hello world',
react: <EmailTemplate firstName="John" product="MyApp" />,
});
MIT License
FAQs
Node.js library for the Resend API
The npm package @vcapretz/resend receives a total of 0 weekly downloads. As such, @vcapretz/resend popularity was classified as not popular.
We found that @vcapretz/resend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.