smtp

mail.Smtp

mtwin.mail.Smtp is a minimal smtp client, that you can use to send an email via a smtp host.

A usual use of mail.Smtp to send a text/plain and text/html email will be:

  var p = new mtwin.mail.Part("multipart/alternative");
  p.setHeader("From",from);
  p.setHeader("To",to);
  p.setDate();
  p.setHeader("Subject","A Haxe e-mail !");
  var h = p.newPart("text/html");
  var t = p.newPart("text/plain");
  h.setContent("<html><p>some html ...</p></html>");
  t.setContent("some plain text...");

  mtwin.mail.Smtp.send( "smtp.host.com", from, to, p.get() );
version #8139, modified 2010-02-23 03:59:44 by Abscissa