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

elastic-email-transport-nodemailer

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-email-transport-nodemailer

A Nodemailer transport for Elastic Email API

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
120
Maintainers
0
Weekly downloads
 
Created
Source

nodemailer-elasticemail-transport

A Nodemailer transport for sending emails via Elastic Email's API.

Installation

npm install nodemailer-elasticemail-transport



const nodemailer = require('nodemailer');
const elasticEmailTransport = require('nodemailer-elasticemail-transport');

const transporter = nodemailer.createTransport(
    elasticEmailTransport({
        apiKey: 'YOUR_ELASTIC_EMAIL_API_KEY',
    })
);

const mailOptions = {
    from: 'no-reply@example.com',
    to: 'recipient@example.com',
    subject: 'Hello from Elastic Email API',
    text: 'This is a plain text email!',
    html: '<p>This is an <b>HTML</b> email!</p>',
};

transporter.sendMail(mailOptions, (error, info) => {
    if (error) {
        console.error('Error sending email:', error);
    } else {
        console.log('Email sent successfully:', info.response);
    }
});

Keywords

FAQs

Package last updated on 12 Dec 2024

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