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

@techie04/xpresser-mailer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techie04/xpresser-mailer

mailer helper for xpresser

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by1800%
Maintainers
1
Weekly downloads
 
Created
Source

XpresserJs Mailer Plugin

Build Status License npm version

A library to help you send mails.

This plugin makes use of nodemailer and aws-sdk ses.

MENU

Installation

npm i @techie04/xpresser-mailer

# OR
yarn add @techie04/xpresser-mailer

Add to plugins.json

{
  "npm://@techie04/xpresser-mailer": true
}

Add to your project config.

({
  // SMTP CONFIG
    "mailer": {
        provider: "SMTP", // SMTP
        host: "", // SMTP Server Host
        port: "", // SMTP Server Port
        username: "", // SMTP Server Username
        password: "", // SMTP Server Password
        fromEmail: "no-reply@example.com" // From email
    },

    // AWS CONFIG
    "mailer": {
        provider: "AWS", // AWS
        region: "", // AWS Server Region
        fromEmail: "no-reply@example.com", // From email
        // AWS credentials
        AWS_ACCESS_KEY_ID: "",
        AWS_SECRET_ACCESS_KEY: ""
    },
  
})

Usage

In your controller or anywhere in your project.

const { sendMail } = require("@techie04/xpresser-mailer");

(async () => {
    
    // array of attachments 
    const attachments = [
        {
            // filename (optional)
            filename: "techieoriname.png",
            // file path or url
            path: path.join(__dirname, "..", "TechieOriname.png")
        }
    ]
    
    await sendMail(
        "example@example.com", // to email
        "testing subject", // message subject
        "my message here", // message body
        "text", // message format ("html" or "text")
        attachments // optional field
    );
});

Typescript support

import { AttachmentType, sendMail } from "@techie04/xpresser-mailer";

// array of attachments 
const attachments: AttachmentType[] = [
    {
        // filename (optional)
        filename: "techieoriname.png",
        // file path or url
        path: path.join(__dirname, "..", "TechieOriname.png")
    }
];

await sendMail(
    "example@example.com",
    "testing subject",
    "my message here",
    "text",
    attachments // optional field
);

FAQs

Package last updated on 06 Nov 2021

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