Socket
Socket
Sign inDemoInstall

mime-message

Package Overview
Dependencies
48
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mime-message

Simple node module to create mime type messages easily and safety!


Version published
Weekly downloads
26
increased by44.44%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Mime-message

Simple node module to create mime types messages easily and safety!

Hi guys! I decided to create this module because I'm working with emails and I did not found any node module to easily create mime messages in the javascript ecosystem. I decided to release it because I'm sure more people has this problem! :).

Api methods

  1. validMimeMessage(data)
  2. createMimeMessage(data)
  3. toBase64SafeString()

How to use it?

const mimeMessage = require('./lib/MimeMessage')

const messageData = {
  type: 'text/html',
  encoding: 'UTF-8',
  from: 'Jorge <mySuperEmail@example.com>',
  to: [
    'User 1 <mail@example.com>',
    'User 2 <mail@example.com>'
  ],
  cc: [
    'User 3 <mail@example.com>'
  ],
  bcc: [],
  replyTo: [
    'Jorge <mySuperEmail@example.com>',
  ],
  date: new Date(),
  subject: 'Hello World!',
  body: '<h1>Hello from the other side!</h1><p>This is pretty awesome!</p>'
}

if (Mime.validMimeMessage(messageData)) {
  const message = Mime.createMimeMessage(messageData)
  const base64SafeString = message.toBase64SafeString()

  console.log(base64SafeString)
}

No more documentation by now. Sorry guys, I'm quite busy right now ><.

Useful papers

  • RFC2822

Keywords

FAQs

Last updated on 14 Apr 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc