A group of c package classes that implement mail sending function
[name]
SMAILER (Simple Mail Sender)
[origin]
This program is that the author writes in the experimental mail to send the system. It is originally just to implement the function, but maybe it is a programmer's inertial character, and several perfect results have become this. Now, the source code after organizing, you can join your own system as needed.
[Features]
- Support verification function, available for options
- Support for HTML text, ordinary text
- Support to send mail according to specific priority
- Support for multiple accessories at a time, available for options
- Support for multiple recipients, for a certain email, you can choose to send only one person, or choose to send it to everyone.
[Description]
- All source code can be downloaded here: http://morningspace.51.net/resource/smailer.php, there is a more detailed introductory article
- The program TestSmailer.cpp demonstrates how to use Smailer's features, this is an application in the form of a command line.
- Time reason, I didn't write GUI, but because all functions have been encapsulated, it is easy to join the SMAILER to join the GUI system.
- The program runs through the MSVC6 compiler, and compiled in Cygwin-B20 (the header is to do a little change), since the code is used in the code, S (T) L and BSD style Socket, therefore at the remaining platforms The transplant should not be very troublesome.
- If you use the MSVC6 command line compiler, you can compile the command below for reference:
CL -GX TestsMailer.cpp smailer.cpp ../mutils/base64helper.cpp WS2_32.lib
[composition]
Almost all classes in the program are under the Smailer name space, the following is a brief description of the classes, more detailed description, please refer to the C Package Class-SMAiler of a group of implementation mail sending features:
- MIMECONTENT: Abstract class, representative email body and accessories
- PlainTextContent: Derived from MIMECONTENT, representing the text of ordinary text
- TextHtmlContent: Derived from MIMECONTENT, representing the body of the HTML format
- AppOCTSTRMCONTENT: Accomputed from MIMECONTENT, representative file forms
- Priority: Tools, define three levels of mail priority
- MailInfo: Encaps all information about an email
- MailWrapper: Contains MailInfo, used to process the information of MailInfo
- Mailsender: Mail Send Class
- ERRORMESSAGE: Tool class, which provides unified error description information for failure for a given operation, is a single piece
- Mailexception: The exception is thrown when the tool class is wrong.
In addition, there are several tool classes, which are located under the MUTILS name space:
- FileHelper: Provide file I / O function
- WinsockHelper: Provides support features necessary for Winsock programming
- Base64Helper: Provides Base64 encoding / decoding function
- MORNING -