smtpmailer 0.4.0

Haxe SMTP mailer with support for SSL & StartTLS

Released 2017-07-26.

To install, run:

haxelib install smtpmailer 0.4.0

See using Haxelib in Haxelib documentation for more information.

Maintainerbenmerckx
Websitehttps://github.com/benmerckx/smtpmailer
Current version0.4.0
StatisticsInstalled 379 times
LicenseMIT
Tags

README.md

smtpmailer

Runs on sys targets and nodejs.

SSL/StartTls:

  • Supported on java/php/nodejs
  • Supported on haxe 3.2 neko/cpp with -lib hxssl
  • Supported on haxe 3.3+ neko/cpp (using native sys.ssl.Socket)
var mailer = new SmtpMailer({
	host: 'hostname',
	port: 587,
	auth: {
		username: 'user',
		password: 'pass'
	}
});
mailer.send({
	subject: 'Subject',
	from: { address: 'mail@example.com', displayName: "It's me, Mario!" },
	to: ['mail@example.com'],
	content: {
		text: 'hello',
		html: '<font color="red">hello</font>'
	},
	attachments: ['image.png']
}).handle(function(res) {
	switch res {
		case Success(_):
			trace('Email sent!');
		case Failure(e): {
			trace('Something went wrong: '+e);
		}
	}
});