npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nodejs-nodemailer-outlook

v1.2.4

Published

Simple integration between nodeJS and outlook.office365

Downloads

24,415

Readme

NodeJS Nodemailer Outlook

Simple integration between node js and outlook.office365 emailing servers this project depends on Nodemailer library overriding its variables with outlook.office365 defaults.

Getting Started

Install module using following command :

npm install nodejs-nodemailer-outlook

In your file.js run the following

var nodeoutlook = require('nodejs-nodemailer-outlook')
nodeoutlook.sendEmail({
    auth: {
        user: "[email protected]",
        pass: "********"
    },
    from: '[email protected]',
    to: '[email protected]',
    subject: 'Hey you, awesome!',
    html: '<b>This is bold text</b>',
    text: 'This is text version!',
    replyTo: '[email protected]',
    attachments: [
                        {
                            filename: 'text1.txt',
                            content: 'hello world!'
                        },
                        {   // binary buffer as an attachment
                            filename: 'text2.txt',
                            content: new Buffer('hello world!','utf-8')
                        },
                        {   // file on disk as an attachment
                            filename: 'text3.txt',
                            path: '/path/to/file.txt' // stream this file
                        },
                        {   // filename and content type is derived from path
                            path: '/path/to/file.txt'
                        },
                        {   // stream as an attachment
                            filename: 'text4.txt',
                            content: fs.createReadStream('file.txt')
                        },
                        {   // define custom content type for the attachment
                            filename: 'text.bin',
                            content: 'hello world!',
                            contentType: 'text/plain'
                        },
                        {   // use URL as an attachment
                            filename: 'license.txt',
                            path: 'https://raw.github.com/nodemailer/nodemailer/master/LICENSE'
                        },
                        {   // encoded string as an attachment
                            filename: 'text1.txt',
                            content: 'aGVsbG8gd29ybGQh',
                            encoding: 'base64'
                        },
                        {   // data uri as an attachment
                            path: 'data:text/plain;base64,aGVsbG8gd29ybGQ='
                        },
                        {
                            // use pregenerated MIME node
                            raw: 'Content-Type: text/plain\r\n' +
                                 'Content-Disposition: attachment;\r\n' +
                                 '\r\n' +
                                 'Hello world!'
                        }
                    ],
    onError: (e) => console.log(e),
    onSuccess: (i) => console.log(i)
}


);

Options :

  • auth (Required): JSON object contains two keys user and pass these are the authentication of the sender account on email server ex: {"user":"[email protected]","pass":"123456"}

  • host : Server host url, Default : smtp.office365.com

  • port : Server port, Default : 587

  • secure : false for TLS - as a boolean not string

  • to (Required if no cc or bcc are provided): Comma separated emails represent the target recipients.

  • cc (Required if no to or bcc are provided): Comma separated emails represent the target carbon copy (CC) recipients.

  • bcc (Required if no to or cc are provided): Comma separated emails represent the target blind carbon copy (BCC) recipients.

  • subject (Optional): Email subject.

  • text (Optional): Email text body version.

  • html (Optional): Email html body version.

  • replyTo: An email address that will appear on the Reply-To: field

  • attachments (Optional): JSON array of attachments.

  • onError (Optional): Error callback with argument error object.

  • onSuccess (Optional): Success callback with argument info object.

Built With

  • Nodemailer - module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default.

Versioning

Current version : 1.2.2

Authors

  • Youans Ezzat

Links

Github

NPM

License

Apache 2.0 License.