1.3.0 • Published 8 months ago

@storecraft/mailer-providers-http v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

9 months ago

1.0.16

10 months ago

1.2.5

9 months ago

1.3.0

8 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.11

11 months ago

1.0.12

11 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.10

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

2 years ago