1.3.0 • Published 3 months ago
@storecraft/mailer-providers-http v1.3.0
storecraft
Official serverless http email providers
Supports wellknown http-based serverless
friendly email
providers,
npm i @storecraft/mailer-providers-http
Howto
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 (tomer.shalev@gmail.com)
1.0.17
4 months ago
1.0.16
4 months ago
1.2.5
3 months ago
1.3.0
3 months ago
1.0.15
4 months ago
1.0.14
4 months ago
1.0.13
4 months ago
1.0.11
5 months ago
1.0.12
5 months ago
1.0.9
6 months ago
1.0.8
6 months ago
1.0.7
7 months ago
1.0.6
9 months ago
1.0.10
6 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
12 months ago
1.0.0
1 year ago