pony

send email

pony

Send email and a pony.

example

var pony = require('pony');
 
var mail = pony({
    host : 'localhost',
    port : 25,
    from : 'substack',
    to : 'root',
});
mail.setHeader('content-type', 'text/plain');
mail.setHeader('subject', 'greetings');
mail.end('oh hello');

methods

var pony = require('pony')

Send an email with some parameters params.

An optional callback cb(err, req) will fire once the initial handshake is complete.

The request object is a stream that behaves like the req you get from http.createServer().

SMTP messages are a lot like is HTTP messages is why.

Use setHeader() to set the 'content-type', 'subject', and such things relevant to emails.

Remove a header.

Write a string or Buffer to the message body after the headers.

End the message body, optionally writing an additional Buffer or string data first.

install

With npm do:

npm install pony

tests

With npm do:

npm test

pony comics

more shetland pony adventures

pony returns

license

MIT