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

microsoft-graph-mail-sender

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microsoft-graph-mail-sender

A versatile Node.js email solution leveraging mailing-core with Microsoft Azure Graph API integration. This package simplifies sending emails by offering support for both HTML and plain text content, ensuring seamless integration with Azure services for s

  • 0.1.8
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Mailing Core Package with Microsoft Azure Graph Transporter

Overview

This package provides an efficient solution to send emails using mailing-core and Microsoft Azure's Graph API as the transporter. It's designed for developers who need a reliable and scalable mailing solution integrated with Azure services.

Features

Easy integration with Microsoft Azure Graph API. Configurable transport layer for sending emails. Error handling and logging for debugging.

Prerequisites

Azure AD Tenant ID, Client ID, and Client Secret. mailing-core package installed in your project. Familiarity with Node.js and asynchronous programming.

Installation

Ensure you have mailing-core installed. If not, install it using npm:

npm install mailing-core

Usage

First, import the createSendMail function from the package:

import createSendMail from 'your-package-name'; // Replace with your actual package name

Configure the Azure credentials and default sender information:

const azureAdTenantId = 'your-tenant-id'; const azureAdClientId = 'your-client-id'; const azureAdClientSecret = 'your-client-secret'; const defaultFrom = 'your-default-email@example.com'; const configPath = 'path-to-your-config-file'; // Optional

const sendMail = createSendMail(azureAdTenantId, azureAdClientId, azureAdClientSecret, defaultFrom, configPath);

API Reference

API Reference

createSendMail(azureAdTenantId, azureAdClientId, azureAdClientSecret, defaultFrom, configPath) Creates a configured sendMail function.

Parameters:

azureAdTenantId (string): Azure AD Tenant ID. azureAdClientId (string): Azure AD Client ID. azureAdClientSecret (string): Azure AD Client Secret. defaultFrom (string): Default sender email address. configPath (string, optional): Path to the configuration file. sendMail(mailOptions, callback) Sends an email using the configured transport.

Parameters:

mailOptions (object): Email options (to, subject, html or text). callback (function): Callback function for handling response or error.

FAQs

Package last updated on 12 Dec 2023

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