
XMTP Sample Script
<?XTRIME Language=JavaScript XTRIME?>
var SMTP = Ctx.CreateInstance("XTRIME.SMTPMessage.1");
var MIME = SMTP.MIME;
SMTP.To = Request.Header("From");
// reply back to the sender
SMTP.From = Request.Header("To");
MIME.Header("Content-Type") = "text/plain";
// send the reply back as the body of the message
MIME.Header("MIME-Version") = "1.0";
MIME.Header("Reply-To") = "<jborden@mediaone.net>";
// any questions always go to me :-))
Request.MessageType = 3;
// this means use XML format for the MIME message
SMTP.Body = Request;
// this 'assigns' the body of the SMTP message to the MIME Request
SMTP.Send(); // send it
Ctx.Commit(); // commit the transaction and *really* do it
Notes:
XTRIME is JABR's Xtensible Transacted Internet
Messaging Engine.
The message isn't actually sent until the transaction is committed with: Ctx.Commit();