The library implements SMTP client and exposes a simple COM interface to send emails. The interface is simple and straightforward, and the emails can be send from various environments, including such as JavaScript code. The class supports SSL/TLS security and is GMail compliant.
A JScript code snippet below provides a sample use case:
message = new ActiveXObject("AlaxInfo.EmailTools.Message"); message.ServerHost = "mail.alax.info"; //message.ServerPort = 25; message.Sender = "Sender <test@alax.info>"; message.ToRecipients = "Recipient <address@gmail.com>"; //message.CcRecipients = ""; //message.BccRecipients = ""; message.Subject = "Message Test (Plain)"; message.Body = "This is an e-mail message test:" + "\r\n" + "" + "\r\n" + "- Security: None" + "\r\n" + "- Authentication: Plain Text (PLAIN)" + "\r\n" + ""; message.AuthMethods = "plain"; message.AuthName = "test@alax.info"; message.AuthPassword = "12345678"; message.Send();
The capabilities include:
- No additional dependencies – regsvr32 the DLL and it’s ready to use; SSL/TLS implementation through SChannel API
- UTF-8 encoding and support for Unicode and international characters
- Secure SSL connections (SecureSocketsLayer property)
- Secure Transport Layer Security (TLS) connections with STARTTLS command (TransportLayerSecurity property)
- Authentication options: plain text (LOGIN, PLAIN), digest (CRAM-MD5)
- Protocol References:
- RFC 5321 – Simple Mail Transfer Protocol
- RFC 2045 – Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
- RFC 3207 – SMTP Service Extension for Secure SMTP over Transport Layer Security
- RFC 2195 – IMAP/POP AUTHorize Extension for Simple Challenge/Response
- RFC 4616 – The PLAIN Simple Authentication and Security Layer (SASL) Mechanism
Relaying through Google Mail needs secure connection (SSL or TLS) plus plain text authentication of sender:
message = new ActiveXObject("AlaxInfo.EmailTools.Message"); message.ServerHost = "smtp.gmail.com"; //message.ServerPort = 587; message.Sender = "Sender <foo+sender@gmail.com>"; message.ToRecipients = "Recipient <bar+receiver@gmail.com>"; //message.CcRecipients = ""; //message.BccRecipients = ""; message.Subject = "Message Test (TLS, Plain)"; message.Body = "This is an e-mail message test:" + "\r\n" + "" + "\r\n" + "- Security: TLS" + "\r\n" + "- Authentication: Plain Text (PLAIN)" + "\r\n" + ""; message.TransportLayerSecurity = true; message.AuthMethods = "plain"; message.AuthName = "foo@gmail.com"; message.AuthPassword = "password"; message.Send();
Download Information
- Download (32-bit): EmailTools.dll
- Download (64-bit): EmailTools.dll
- License: This software is free to use