Socket
Socket
Sign inDemoInstall

smtp2go-nodejs

Package Overview
Dependencies
9
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    smtp2go-nodejs

NodeJS Library for interacting with the SMTP2GO API


Version published
Weekly downloads
21
increased by110%
Maintainers
1
Install size
2.16 MB
Created
Weekly downloads
 

Readme

Source

SMTP2GO-Node API Wrapper

This library provides a simple way to send email via the SMTP2GO API and also access other endpoints in the API in a standard way.

Installation

npm i smtp2go-nodejs

Example Code - Sending an Email

import SMTP2GOApi from 'smtp2go-nodejs';

const api = SMTP2GOApi(process.env.APIKEY);

const mailService = api.mail()
    .to({ email: 'to@address.dev',name:"Optional Name" })
    .cc({ email: 'cc@address.dev' })
    .from({ email: 'from@address.dev' })
    .subject('Testing')
    .html(```<h1>Hello World</h1>
    <img src="cid:a-cat"/>
    <p>This is a test html email!</p>```)
    .attach(require('path').resolve(__dirname, './files/test.txt'))
    .inline('a-cat', require('path').resolve(__dirname, './files/cat.jpg'));

api.client().consume(mailService);

Keywords

FAQs

Last updated on 05 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc