Simple Email Client v1.0


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

Environment: VC6 SP5, Windows 2000 (used to work VC6 SP3, NT 4.0/Win95/Win98)


This ATL COM component provides very simple Internet email functionality (SMTP).


  • implements the basics of SMTP, as defined in RFC821 and RFC822,
  • sends plain text email: no attachements, no MIME encoding,
  • supports multiple recipients (separate email addresses with commas ','),
  • supports multiple email servers (try next server if email cannot be delivered to a server),
  • provides automatic detection of SMTP server (resolve MX record in the DNS, using COMponent SimpleDNSResolver)
  • provides extended error information (ISupportErrorInfo and IErrorInfo are implemented),
  • is safe for scripting (IObjectSafety is implemented),
  • provides very small executable: 44 Ko (MinSize) to 152 Ko (MinDependency)
  • requires no Graphical User Interface: the component can be used in non-GUI applications, like a Windows NT Service.
  • runs on Windows 2000 (originally on NT 4.0, Windows 95 and Windows 98)
  • compiles with VC++ 6.0 SP3


To use this component:
  • create an instance of the component,
  • call method SendEmail from interface ISimpleEmailClientX,
  • handle errors (try/catch in C++)


    #import "SimpleEmailClient.dll" no_namespace

    ISimpleEmailClientXPtr pSimpleEmailClientX;

    HRESULT hResult = CoInitialize(NULL); 
    hResult = pSimpleEmailClientX.CreateInstance("Emmanuel.SimpleEmailClientX.1");

    hResult = pSimpleEmailClientX->SendEmail(_bstr_t("me@mydomain.com"), 
                                             _bstr_t("My Subject"), 
                                             _bstr_t("My Text..."), 


Please refer to the demo project for a full example. Note that you should extract the demo project underneath the component project:



  Dim oSMTP

  Set oSMTP = CreateObject("Emmanuel.SimpleEmailClientX.1")

  oSMTP.SendEmail "me@mydomain.com", "you@yourdomain.com", 
                  "My Subject", "My Text...", "myserver.domain.com"

Please refer to the test HTML file "TestSimpleEmailClient.htm" for a full VBSsript example (see GUI below)

Using the SimpleEmailClient in Internet Explorer>
Click here for larger image


This component relies on two MFC-related C++ class:
  • CSimpleSocket: an extension of MFC class CSocket providing text and timer features
  • CSimpleSMTPClient: a C++ class implementing a SMTP client.

You can integrate these classes in your application if you don't want to use the component.

If the COMponent "Emmanuel.SimpleDNSClient" is installed on your machine, it will be used to find the name of you SMTP server(s) as registered in the DNS. You will not need to provide a SMTP name as the 5th parameter of method SendEmail (just put an empty string). Please refer to the SimpleDNSClient documentation (www.kartmann.org) for details.


  • Support attachments
  • Support binary data (MIME encoding)
  • Support additional SMTP headers (Reply-To, Cc, Bcc, etc...)
  • Support ESMTP


Download demo project - 122 Kb
Download source - 147 Kb


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date