Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
SMTP.h
Package: MailMulti.rar [view]
Upload User: tjsct008
Upload Date: 2016-12-02
Package Size: 3750k
Code Size: 1k
Category:
WEB Mail
Development Platform:
Visual C++
- // SMTP.h: interface for the CSMTP class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_SMTP_H__14387B48_E339_4CC3_BD01_9BE6C6010E46__INCLUDED_)
- #define AFX_SMTP_H__14387B48_E339_4CC3_BD01_9BE6C6010E46__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <afxsock.h>
- #include "MailMessage.h"
- #define SMTP_PORT 25
- #define RESPONSE_BUFFER_SIZE 1024
- class CSMTP
- {
- public:
- CSMTP(LPCSTR szSMTPServerName,UINT nPort = SMTP_PORT);
- virtual ~CSMTP();
- CString GetLastError();
- UINT GetPort();
- BOOL DisConnect();
- BOOL Connect();
- virtual BOOL FormatMailMessage(CMailMessage * msg);
- BOOL SendMessage(CMailMessage * msg);
- CString GetServerHostName();
- private:
- BOOL get_response(UINT response_expect);
- CString cook_body(CMailMessage * pmg);
- CString m_sError;
- BOOL m_bConnected;
- UINT m_nPort;
- CString m_sSTMPServerHostName;
- CSocket m_wsSMTPServer;
- protected:
- virtual BOOL transmit_message(CMailMessage * msg);
- struct response_code
- {
- UINT nResponse;
- TCHAR * sMessage;
- };
- enum eResponse
- {
- GENERIC_SUCCESS = 0,
- CONNECT_SUCCESS,
- DATA_SUCCESS,
- QUIT_SUCCESS,
- LAST_RESPONSE
- };
- TCHAR * response_buf;
- static response_code response_table[];
- };
- #endif // !defined(AFX_SMTP_H__14387B48_E339_4CC3_BD01_9BE6C6010E46__INCLUDED_)