andris9/Nodemailer — pull request #132 by chris-rock (2013-02-03 19:45:54+00:00)
Title: minor improvement to submit alternatives without array

Instead of
var options = {
sender: 'Sender sender@example.com',
to: '"Receiver" receiver@example.com',
subject: 'Appointment',
text: 'Appointment Plain',
html: 'Appointment HTML',
alternative : [
{
contentType: "text/calendar; method=REQUEST; name="meeting.ics"",
contents: new Buffer(...),
contentEncoding: 7bit
}
]
};

you could also write:

var options = {
sender: 'Sender sender@example.com',
to: '"Receiver" receiver@example.com',
subject: 'Appointment',
text: 'Appointment Plain',
html: 'Appointment HTML',
alternative :
{
contentType: "text/calendar; method=REQUEST; name="meeting.ics"",
contents: new Buffer(...),
contentEncoding: 7bit
}
};