0.4.3 • Published 2 years ago

@big-whale-labs/ketl-email v0.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SealCred email template

Installation

yarn add @big-whale-labs/ketl-email

Add .env into project root if you need one:

Environment variables

NameDescription
ASSETS_ADDRESSAddress, where the assets (images) will be loaded from
KETL_ADDRESSWeb-site address to create proper email-link in button
MAILGUN_API_KEYUsed to send test emails
MAILGUN_DOMAINUsed to send test emails
TEST_EMAILUsed to send test emails, use the one you used in the app
TEST_TWITTER_HANDLEUsed to send test emails, shouldn't include @, use the one you used in the app

How to Use

import { createTransport } from 'nodemailer'
import { token } from '@big-whale-labs/ketl-email'
import env from '../helpers/env'

const user = env.SMTP_USER
const pass = env.SMTP_PASS

const emailer = createTransport({
  host: 'box.mail.sealcred.xyz',
  port: 465,
  secure: true,
  auth: {
    user,
    pass,
  },
})

export default function (to: string, subject: string, text: string) {
  return emailer.sendMail({
    from: `"Ketl" <${user}>`,
    to,
    subject,
    html: token.replace('{{token}}', text),
  })
}

Local launch

  1. Install dependencies with yarn
  2. Run the server with yarn start

Development in conjunction with another project

  1. Run yarn link in the root folder, more about yarn link
  2. Run develop mode with yarn start
  3. In another project. Run yarn link @big-whale-labs/ketl-email
  4. Nice! Your project will now use the local version of @big-whale-labs/ketl-email

Available scripts

  • yarn start — runs email templates in the development mode
  • yarn build — builds email templates for production to the dist folder
  • yarn release — create a release and publish the package using ci
0.1.15

2 years ago

0.3.0

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.9

2 years ago

0.3.10

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.4.1

2 years ago

0.2.3

2 years ago

0.4.0

2 years ago

0.2.2

2 years ago

0.4.3

2 years ago

0.2.5

2 years ago

0.4.2

2 years ago

0.2.4

2 years ago

0.1.14

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago