@storecraft/mailer-providers-http
v1.3.0
Published
Official Serverless Friendly e-mail adapters for storecraft
Maintainers
Readme
storecraft Official serverless http email providers
Supports wellknown http-based serverless friendly email providers,
npm i @storecraft/mailer-providers-httpHowto
Sendgrid
import { App } from '@storecraft/core';
import { SendGrid } from '@storecraft/mailer-providers-http/sendgrid';
const app = new App(config)
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB())
.withStorage(new GoogleStorage())
.withMailer(
new SendGrid(
{
apikey: process.env.SEND_GRID_SECRET
}
)
).init();Storecraft will search the following env variables
SENDGRID_API_KEY=<key>So, you can instantiate with empty config
.withMailer(
new SendGrid()
)Resend
import { App } from '@storecraft/core';
import { Resend } from '@storecraft/mailer-providers-http/resend';
const app = new App(config)
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB())
.withStorage(new GoogleStorage())
.withMailer(
new Resend(
{
apikey: process.env.RESEND_API_KEY
}
)
).init();Storecraft will search the following env variables
RESEND_API_KEY=<key>So, you can instantiate with empty config
.withMailer(
new Resend()
)Mailchimp
import { App } from '@storecraft/core';
import { MailChimp } from '@storecraft/mailer-providers-http/mailchimp';
const app = new App(config)
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB())
.withStorage(new GoogleStorage())
.withMailer(
new MailChimp(
{
apikey: process.env.MAILCHIMP_API_KEY
}
)
).init();
Storecraft will search the following env variables
MAILCHIMP_API_KEY=<key>So, you can instantiate with empty config
.withMailer(
new MailChimp()
)Mailgun
import { App } from '@storecraft/core';
import { Mailgun } from '@storecraft/mailer-providers-http/mailgun';
const app = new App(config)
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB())
.withStorage(new GoogleStorage())
.withMailer(
new Mailgun(
{
apikey: process.env.MAILGUN_API_KEY
}
)
).init();Storecraft will search the following env variables
MAILGUN_API_KEY=<key>So, you can instantiate with empty config
.withMailer(
new Mailgun()
)Author: Tomer Shalev ([email protected])