New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mail-function

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mail-function

a mail function for sending emails like in php

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

mail-function

A mail-function is a mail function that works almost like php function mail. You have to call only one function for sending emails and nothing else :).

Worning: for the emails have been sent successfully you have to install and customize on your server MTA (mail transfer agent)

The authors is Neo that is very well known in runet as Hacker Kselax Here is his home-page to visit

npm version

mail(options)

The mail function accept such options in such order like in below

from - the sender address it could be american-chat.ru american-chat.ru@kselax.ru or whatever...

to - the email address where you send

subject - is an email subject

html - html text the body of email

fn - a callback function where you can check check error (optional)

The mail function is an async function, be careful, you can get results only pass the callback

Installation

$ npm install mail-function --save

The example

var mail = require('./index.js');

mail(
  'american-chat.ru <american-chat.ru@kselax.ru>',
  'neo@neo.ru',
  'your_subject',
  '<h1>This is body</h1>',
  function(error, info){
    if(error){
      console.log(error);
    }else{
      console.log('The email has been sent successfully');
    }
  }
);

License

This software is free to use under GNU General Public License GPL. See the license description for license text and copyright information.

Keywords

email

FAQs

Package last updated on 07 Jul 2018

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