Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailjet-sendemail

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailjet-sendemail

Sends email using Mailjet API via Node.js

  • 1.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mailjet-sendemail

This library permits to send emails using Mailjet's API in Node.js. It's MIT licensed.

Installation

npm install mailjet-sendemail

Initialization

Access to the API is done through a Mailjet object. It's instantiated like so:

var Mailjet = require('mailjet-sendemail');
var mailjet = new Mailjet('apiKey', 'secretKey');

Sending Email

sendContent

Sends an email.

mailjet.sendContent(from, to, subject, type, content);
  • from - Sender of the message; this should be a full email address (e.g. example@example.com).
  • to - A string (example@example.com) or array of strings (['a@example.com', 'b@example.com']) of recipients. For cc and bcc support, append cc: or bcc: to the recipient email address (cc:example@example.com).
  • subject - Message subject
  • type - The type of the email, 'text' or 'html'
  • content - Message content, depending on the type

Examples

With plain text :

mailjet.sendContent('sender@example.com',
         ['recipient1@example.com', 'bcc:recipient2@example.com'],
         'This is a test !',
         'text',
         'Well, this is working !')

With HTML :

mailjet.sendContent('sender@example.com',
         ['recipient1@example.com', 'bcc:recipient2@example.com'],
         'This is a test !',
         'html',
         '<b>Well, this is working !</b>')

FAQs

Package last updated on 13 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc