<commit_before># nodemailer-mandrill-transport

A Mandrill transport for Nodemailer.

[![Build Status](https://travis-ci.org/Rebelmail/nodemailer-mandrill-transport.svg?branch=sm-readme)](https://travis-ci.org/Rebelmail/nodemailer-mandrill-transport)
[![NPM version](https://badge.fury.io/js/nodemailer-mandrill-transport.png)](http://badge.fury.io/js/nodemailer-mandrill-transport)

## Example

```javascript
'use strict';

var nodemailer = require('nodemailer');

var mandrillTransport = require('nodemailer-mandrill-transport');

var transport = nodemailer.createTransport(mandrillTransport({
  auth: {
    apiKey: 'key'
  }
}));

transport.sendMail({
  from: '<EMAIL>',
  to: '<EMAIL>',
  subject: 'Hello',
  html: '<p>How are you?</p>'
}, function(err, info) {
  if (err) {
    console.error(err);
  } else {
    console.log(info);
  }
});
```

## Using Mandrill API options



```javascript
transport.sendMail({
   data: {
      template_name: 'contact-form',
      template_content: [],
      subject: 'Hello',
      from: 'bernie senders <EMAIL>',
      to: '<EMAIL>, <EMAIL>',
      cc: '<EMAIL>, <EMAIL>',
      bcc: [
        '<EMAIL>', 
        {
          name: '<NAME>',
          address: '<EMAIL>'
        }
      ],
      replyTo: '<EMAIL>',
      messageId: 'test',
    }
}, /* ... */);
```

transform to <commit_msg>update readme.md. Need to test codeclimate integration.<commit_after># nodemailer-mandrill-template-transport

A Mandrill transport for Nodemailer, it's a mix beetween [nodemailer-mandrill-template-transport](https://github.com/RebelMail/nodemailer-mandrill-transport) and commons E-mail message fields

This package is used to use "Mandrill.message#send-template".

## Example

```javascript
import nodemailer from 'nodemailer';
import mandrillTemplateTransport from 'nodemailer-mandrill-template-transport';

const transport = nodemailer.createTransport(mandrillTemplateTransport({
  auth: {
    apiKey: 'key'
  }
}));

transform to mandrill options
{'fraction_non_alphanumeric': 0.1581067472306143, 'fraction_numerical': 0.0, 'mean_word_length': 3.882063882063882, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5336880', 'n_tokens_mistral': 680, 'n_tokens_neox': 659, 'n_words': 129}