0.1.2 • Published 2 years ago

@big-whale-labs/seal-cred-email-template v0.1.2

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

SealCred email template

Installation

yarn add @big-whale-labs/seal-cred-email or npm i @big-whale-labs/seal-cred-email

How to Use

import { token } from '@big-whale-labs/seal-cred-email'
import { createTransport } from 'nodemailer'
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, html: string) {
  return emailer.sendMail({
    from: `"SealCred" <${user}>`,
    to,
    subject,
    html: token,
  })
}

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/seal-cred-email
  4. Nice! Your project will now use the local version of @big-whale-labs/seal-cred-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.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago