smtpmailer

Haxe SMTP mailer with support for SSL & StartTLS
https://github.com/benmerckx/smtpmailer

To install, run:

haxelib install smtpmailer 0.4.0 

See using Haxelib in Haxelib documentation for more information.

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);
		}
	}
});
Contributors
benmerckx
Version
0.4.0
Published
10 months ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github