CSmtpSocket - Connect to a SMTP server using CSocket..
Here's a pretty straight forward class to connect to a SMTP server using CSocket.
It currently only support plain text messages (no MIME)

BOOL Connect(LPCTSTR lpszServer, UINT nPort, LPCTSTR lpszFrom, LPCTSTR lpszTo, LPCTSTR lpszSubject, LPCTSTR lpszText);
Connect to a SMTP Server.

lpszServer - SMTP server name.
nPort - A number that identifies the TCP/IP port to use on the server (default: 25).
lpszFrom - email address of the sender
lpszTo - Recipient names (seperated with commas: britney@myserver.com, jessica@myserver.com, pamela@myserver.com)
lpszSubject - Subject of the message.
lpszText - Body of the message.

void Disconnect();
Disconnect from SMTP server

Download demo executable

Download source code
This class is part of the Pablo Software Solutions MFC Extension Package - Classes Edition


[Home] [Products] [Source Code] [Downloads]

© 2015 - Pablo Software Solutions
All rights reserved.