New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bakat-mailer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bakat-mailer

Emails services for Bakat.co

0.1.2
latest
Source
npm
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

bakat-mailer

Emails services for Bakat.co

how to use

Divine a object from module with configuration

var Mailer      = require('bakat-mailer')(CONFIG.Mailgun.auth);

CONFIG.Mailgun.auth is config to create email transfer and need you pass the value like below

service : 'email service you want to use if not set the default is Mailgun'
user : process.env.MAILGUN_USER || 'your email user from service you use',
pass : process.env.MAILGUN_PASSWORD || 'your passord for email you use'

Sample data you need to send one email
var dataEmail = {
  to: "key_way_dee@yahoo.com",
  from: "noreply@bakat.co",
  subject: "Test Email",
  template: "index",
  data : req.users
}

to is email you want to send. this field is require

from is email as sender, if not setting will use default email 'noreply@bakat.co'

subject is subject email, this field is require

template is template email you need to setup, but create first template email like on folder templates

data is object data, will use on the template email. like said, you need to write Full Name the reciever you send the email or any else you want to write on the template

API

sendOne

example:

Mailer.sendOne(dataEmail);

dataEmail is the object of parameter you need to send

FAQs

Package last updated on 21 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts