Initial
This commit is contained in:
32
smtp/MAIL.H
Normal file
32
smtp/MAIL.H
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
// mail dialog defines
|
||||
#define MAIL_TEXT 103
|
||||
#define MAIL_SERVER 105
|
||||
#define MAIL_ATTACH 106
|
||||
#define MAIL_FROM 102
|
||||
#define MAIL_SUBJECT 104
|
||||
#define MAIL_TO 101
|
||||
|
||||
// mail server dialog defines
|
||||
#define MS_SERVERNAME 100
|
||||
|
||||
// string table defines
|
||||
#define STRING_MAILKEYNAME 100
|
||||
#define STRING_SERVERKEYNAME 101
|
||||
#define STRING_MAILRECIPIENTSKEYNAME 102
|
||||
#define STRING_MAILREVERSEPATHKEYNAME 103
|
||||
#define STRING_ERROR 104
|
||||
#define STRING_NOSERVER 105
|
||||
#define STRING_NOREVERSEPATH 106
|
||||
#define STRING_NORECIPIENT 107
|
||||
#define STRING_NODATA 108
|
||||
#define STRING_TO 109
|
||||
#define STRING_REPLYTO 110
|
||||
#define STRING_SUBJECT 111
|
||||
#define STRING_DATE 112
|
||||
#define STRING_MAILSENT 113
|
||||
#define STRING_RECIPIENTS 114
|
||||
#define STRING_REVERSEPATH 115
|
||||
#define STRING_DOMAINNAMEKEYNAME 116
|
||||
#define STRING_DOMAINNAMEKEYENTRY 117
|
||||
#define STRING_LOCALHOST 118
|
||||
4
smtp/MAIL.HPP
Normal file
4
smtp/MAIL.HPP
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef _SMTP_MAIL_HPP_
|
||||
#define _SMTP_MAIL_HPP_
|
||||
#include <smtp/mail.h>
|
||||
#endif
|
||||
56
smtp/MAIL.RC
Normal file
56
smtp/MAIL.RC
Normal file
@@ -0,0 +1,56 @@
|
||||
#include <smtp/mail.h>
|
||||
#include <windows.h>
|
||||
|
||||
MAIL ICON "SMTP.ICO"
|
||||
|
||||
Mail DIALOG 1, 11, 277, 217
|
||||
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
||||
CAPTION "Mail"
|
||||
FONT 8, "MS Sans Serif"
|
||||
{
|
||||
COMBOBOX MAIL_TO, 30, 4, 189, 59, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
COMBOBOX MAIL_FROM, 30, 17, 189, 59, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
EDITTEXT MAIL_SUBJECT, 30, 30, 179, 12
|
||||
EDITTEXT MAIL_TEXT, 6, 61, 262, 140, ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "S&end", IDOK, 223, 2, 50, 14
|
||||
PUSHBUTTON "Qui&t", IDCANCEL, 223, 16, 50, 14
|
||||
PUSHBUTTON "&Server...", MAIL_SERVER, 223, 30, 50, 14
|
||||
LTEXT "To:", -1, 2, 6, 16, 8, NOT WS_GROUP
|
||||
LTEXT "From:", -1, 2, 19, 17, 8
|
||||
LTEXT "Subject:", -1, 2, 32, 27, 8
|
||||
PUSHBUTTON "&Attach...", MAIL_ATTACH, 30, 44, 58, 14
|
||||
}
|
||||
|
||||
ServerDialog DIALOG 6, 15, 202, 49
|
||||
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Mail Server"
|
||||
FONT 8, "MS Sans Serif"
|
||||
{
|
||||
LTEXT "Mail Server:", -1, 6, 11, 49, 8
|
||||
EDITTEXT MS_SERVERNAME, 51, 10, 144, 12, ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_TABSTOP
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 145, 27, 50, 14
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
STRING_MAILKEYNAME, "Software\\Diversified\\SimpleMail\\ServerName"
|
||||
STRING_MAILRECIPIENTSKEYNAME, "Software\\Diversified\\SimpleMail\\Recipients"
|
||||
STRING_MAILREVERSEPATHKEYNAME,"Software\\Diversified\\SimpleMail\\ReversePath"
|
||||
STRING_DOMAINNAMEKEYNAME, "System\\CurrentControlSet\\Services\\VxD\\MSTCP"
|
||||
STRING_DOMAINNAMEKEYENTRY, "Domain"
|
||||
STRING_LOCALHOST, "localhost"
|
||||
STRING_SERVERKEYNAME, "SMTPServer"
|
||||
STRING_NOSERVER, "Please specify your SMTP server."
|
||||
STRING_ERROR, "ERROR"
|
||||
STRING_NOREVERSEPATH, "Please specify a reverse path."
|
||||
STRING_NORECIPIENT, "Please specify a recipient."
|
||||
STRING_NODATA, "There is nothing to send."
|
||||
STRING_TO, "to:"
|
||||
STRING_REPLYTO, "reply-to:"
|
||||
STRING_SUBJECT, "subject:"
|
||||
STRING_DATE, "date:"
|
||||
STRING_MAILSENT, "Mail sent."
|
||||
STRING_RECIPIENTS, "Recipients"
|
||||
STRING_REVERSEPATH, "ReversePath"
|
||||
}
|
||||
|
||||
BIN
smtp/MAIL.RWS
Normal file
BIN
smtp/MAIL.RWS
Normal file
Binary file not shown.
56
smtp/MAIL.~RC
Normal file
56
smtp/MAIL.~RC
Normal file
@@ -0,0 +1,56 @@
|
||||
#include <smtp/mail.h>
|
||||
#include <windows.h>
|
||||
|
||||
MAIL ICON "SMTP.ICO"
|
||||
|
||||
Mail DIALOG 1, 11, 277, 217
|
||||
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
||||
CAPTION "Mail"
|
||||
FONT 8, "MS Sans Serif"
|
||||
{
|
||||
COMBOBOX MAIL_TO, 30, 4, 189, 59, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_GROUP | WS_TABSTOP
|
||||
COMBOBOX MAIL_FROM, 30, 17, 189, 59, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
EDITTEXT MAIL_SUBJECT, 30, 30, 179, 12
|
||||
EDITTEXT MAIL_TEXT, 6, 61, 262, 140, ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "S&end", IDOK, 223, 2, 50, 14
|
||||
PUSHBUTTON "Qui&t", IDCANCEL, 223, 16, 50, 14
|
||||
PUSHBUTTON "&Server...", MAIL_SERVER, 223, 30, 50, 14
|
||||
LTEXT "To:", -1, 2, 6, 16, 8, NOT WS_GROUP
|
||||
LTEXT "From:", -1, 2, 19, 17, 8
|
||||
LTEXT "Subject:", -1, 2, 32, 27, 8
|
||||
PUSHBUTTON "&Attach...", MAIL_ATTACH, 30, 44, 58, 14
|
||||
}
|
||||
|
||||
ServerDialog DIALOG 6, 15, 202, 49
|
||||
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Mail Server"
|
||||
FONT 8, "MS Sans Serif"
|
||||
{
|
||||
LTEXT "Mail Server:", -1, 6, 11, 49, 8
|
||||
EDITTEXT MS_SERVERNAME, 51, 10, 144, 12, ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_TABSTOP
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 145, 27, 50, 14
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
STRING_MAILKEYNAME, "Software\\Diversified\\SimpleMail\\ServerName"
|
||||
STRING_MAILRECIPIENTSKEYNAME, "Software\\Diversified\\SimpleMail\\Recipients"
|
||||
STRING_MAILREVERSEPATHKEYNAME,"Software\\Diversified\\SimpleMail\\ReversePath"
|
||||
STRING_DOMAINNAMEKEYNAME, "System\\CurrentControlSet\\Services\\VxD\\MSTCP"
|
||||
STRING_DOMAINNAMEKEYENTRY, "Domain"
|
||||
STRING_LOCALHOST, "localhost"
|
||||
STRING_SERVERKEYNAME, "SMTPServer"
|
||||
STRING_NOSERVER, "Please specify your SMTP server."
|
||||
STRING_ERROR, "ERROR"
|
||||
STRING_NOREVERSEPATH, "Please specify a reverse path."
|
||||
STRING_NORECIPIENT, "Please specify a recipient."
|
||||
STRING_NODATA, "There is nothing to send."
|
||||
STRING_TO, "to:"
|
||||
STRING_REPLYTO, "reply-to:"
|
||||
STRING_SUBJECT, "subject:"
|
||||
STRING_DATE, "date:"
|
||||
STRING_MAILSENT, "Mail sent."
|
||||
STRING_RECIPIENTS, "Recipients"
|
||||
STRING_REVERSEPATH, "ReversePath"
|
||||
}
|
||||
|
||||
288
smtp/MAILDLG.CPP
Normal file
288
smtp/MAILDLG.CPP
Normal file
@@ -0,0 +1,288 @@
|
||||
#include <smtp/maildlg.hpp>
|
||||
#include <smtp/mail.hpp>
|
||||
#include <smtp/mailreg.hpp>
|
||||
#include <smtp/srvrdlg.hpp>
|
||||
#include <smtp/uuencode.hpp>
|
||||
#include <common/systime.hpp>
|
||||
#include <common/opendlg.hpp>
|
||||
#include <statbar/statbar.hpp>
|
||||
|
||||
MailDlg::MailDlg(void)
|
||||
{
|
||||
mInitHandler.setCallback(this,&MailDlg::initHandler);
|
||||
mDestroyHandler.setCallback(this,&MailDlg::destroyHandler);
|
||||
mCommandHandler.setCallback(this,&MailDlg::commandHandler);
|
||||
mCloseHandler.setCallback(this,&MailDlg::closeHandler);
|
||||
mDlgCodeHandler.setCallback(this,&MailDlg::dlgCodeHandler);
|
||||
mOpenHandler.setCallback(this,&MailDlg::openHandler);
|
||||
mPreOpenHandler.setCallback(this,&MailDlg::preOpenHandler);
|
||||
DWindow::insertHandler(VectorHandler::InitDialogHandler,&mInitHandler);
|
||||
DWindow::insertHandler(VectorHandler::DestroyHandler,&mDestroyHandler);
|
||||
DWindow::insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
DWindow::insertHandler(VectorHandler::CloseHandler,&mCloseHandler);
|
||||
DWindow::insertHandler(VectorHandler::DialogCodeHandler,&mDlgCodeHandler);
|
||||
SMTPThread::insertHandler(&mOpenHandler,SMTPThread::MsgOpen);
|
||||
SMTPThread::insertHandler(&mPreOpenHandler,SMTPThread::MsgPreOpen);
|
||||
}
|
||||
|
||||
MailDlg::~MailDlg()
|
||||
{
|
||||
DWindow::removeHandler(VectorHandler::InitDialogHandler,&mInitHandler);
|
||||
DWindow::removeHandler(VectorHandler::DestroyHandler,&mDestroyHandler);
|
||||
DWindow::removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
DWindow::removeHandler(VectorHandler::CloseHandler,&mCloseHandler);
|
||||
DWindow::removeHandler(VectorHandler::DialogCodeHandler,&mDlgCodeHandler);
|
||||
SMTPThread::removeHandler(SMTPThread::MsgOpen);
|
||||
SMTPThread::removeHandler(SMTPThread::MsgPreOpen);
|
||||
}
|
||||
|
||||
MailDlg &MailDlg::operator=(const MailDlg &/*someMailDlg*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOL MailDlg::perform(const String &strCommandLine)
|
||||
{
|
||||
if(!strCommandLine.isNull())mCommandLine=strCommandLine;
|
||||
return ::DialogBoxParam(processInstance(),(LPSTR)"Mail",(HWND)0,DWindow::DlgProc,(LPARAM)(DWindow*)this);
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MailDlg::initHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
::SetClassLong(*this,GCL_HICON,(long)(HICON)::LoadIcon(processInstance(),"MAIL"));
|
||||
mStatusBar=new StatusBar(*this);
|
||||
mStatusBar.disposition(PointerDisposition::Delete);
|
||||
initializeRecipients();
|
||||
initializeReversePaths();
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MailDlg::destroyHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MailDlg::dlgCodeHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)DLGC_WANTARROWS|DLGC_WANTCHARS;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MailDlg::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wmCommandID())
|
||||
{
|
||||
case IDOK :
|
||||
if(getFields())open(mMailInfo.server());
|
||||
break;
|
||||
case IDCANCEL :
|
||||
endDialog(FALSE);
|
||||
break;
|
||||
case MailServer :
|
||||
handleMailServer();
|
||||
break;
|
||||
case MailTo :
|
||||
handleMailTo(someCallbackData);
|
||||
break;
|
||||
case MailFrom :
|
||||
handleMailFrom(someCallbackData);
|
||||
break;
|
||||
case MailAttach :
|
||||
handleMailAttach();
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MailDlg::closeHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
DWORD MailDlg::preOpenHandler(ThreadMessage &someThreadMessage)
|
||||
{
|
||||
enableControls(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD MailDlg::openHandler(ThreadMessage &someThreadMessage)
|
||||
{
|
||||
if(!someThreadMessage.userDataOne())
|
||||
{
|
||||
enableControls(TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
sendMail();
|
||||
enableControls(TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void MailDlg::handleMailTo(CallbackData &someCallbackData)
|
||||
{
|
||||
if(CBN_KILLFOCUS!=someCallbackData.wmCommandCommand())return;
|
||||
MailReg mailReg;
|
||||
String comboText;
|
||||
getText(MailTo,comboText);
|
||||
mailReg.addRecipient(comboText);
|
||||
}
|
||||
|
||||
void MailDlg::handleMailFrom(CallbackData &someCallbackData)
|
||||
{
|
||||
if(CBN_KILLFOCUS!=someCallbackData.wmCommandCommand())return;
|
||||
MailReg mailReg;
|
||||
String comboText;
|
||||
getText(MailFrom,comboText);
|
||||
mailReg.addReversePath(comboText);
|
||||
}
|
||||
|
||||
void MailDlg::handleMailServer(void)
|
||||
{
|
||||
String serverName;
|
||||
ServerDialog serverDialog(*this);
|
||||
serverDialog.performDialog(serverName);
|
||||
}
|
||||
|
||||
void MailDlg::handleMailAttach(void)
|
||||
{
|
||||
OpenDialog openFile;
|
||||
String pathFileName;
|
||||
UUEncode uuEncode;
|
||||
|
||||
if(!openFile.getOpenFileName(*this,"*.*","Open File","",pathFileName))return;
|
||||
if(!uuEncode.encode(*this,pathFileName,mAttachment,FALSE))
|
||||
mStatusBar->setText(pathFileName+String(" is not attached."));
|
||||
else mStatusBar->setText(pathFileName+String(" is attached."));
|
||||
}
|
||||
|
||||
BOOL MailDlg::getFields(void)
|
||||
{
|
||||
String workString;
|
||||
DWORD lineCount;
|
||||
|
||||
getText(MailFrom,workString);
|
||||
mMailInfo.reversePath(workString);
|
||||
getText(MailTo,workString);
|
||||
mMailInfo.toField(workString);
|
||||
getText(MailSubject,workString);
|
||||
mMailInfo.subjectField(workString);
|
||||
lineCount=DWindow::sendMessage(MailText,EM_GETLINECOUNT,0,0L);
|
||||
mMailInfo.mailData().remove();
|
||||
for(int itemIndex=0;itemIndex<lineCount;itemIndex++)
|
||||
{
|
||||
String lineString;
|
||||
*((WORD*)(LPSTR)lineString)=String::MaxString;
|
||||
if(!DWindow::sendMessage(MailText,EM_GETLINE,itemIndex,(LPARAM)(LPSTR)lineString))lineString="\n";
|
||||
mMailInfo.mailData().insert(&lineString);
|
||||
}
|
||||
MailReg mailReg;
|
||||
mMailInfo.server(mailReg.server());
|
||||
if(mMailInfo.server().isNull())
|
||||
{
|
||||
handleMailServer();
|
||||
MailReg mailReg;
|
||||
mMailInfo.server(mailReg.server());
|
||||
if(mMailInfo.server().isNull())
|
||||
{
|
||||
::MessageBox(*this,(LPSTR)String(STRING_NOSERVER),(LPSTR)String(STRING_ERROR),MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if(mMailInfo.reversePath().isNull())
|
||||
{
|
||||
::MessageBox(*this,(LPSTR)String(STRING_NOREVERSEPATH),(LPSTR)String(STRING_ERROR),MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
if(mMailInfo.toField().isNull())
|
||||
{
|
||||
::MessageBox(*this,(LPSTR)String(STRING_NORECIPIENT),(LPSTR)String(STRING_ERROR),MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
if(!mMailInfo.mailData().size())
|
||||
{
|
||||
::MessageBox(*this,(LPSTR)String(STRING_NODATA),(LPSTR)String(STRING_ERROR),MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
if(!mMailInfo.server().isNull())return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MailDlg::sendMail(void)
|
||||
{
|
||||
RegKey regKey(RegKey::LocalMachine);
|
||||
Block<String> mailData;
|
||||
Block<String> recipients;
|
||||
String headerString;
|
||||
String strDomain;
|
||||
|
||||
if(regKey.openKey(String(STRING_DOMAINNAMEKEYNAME)))regKey.queryValue(String(STRING_DOMAINNAMEKEYENTRY),strDomain);
|
||||
if(strDomain.isNull())strDomain=String(STRING_LOCALHOST);
|
||||
if(!helo(strDomain))return;
|
||||
if(!mail(mMailInfo.reversePath()))return;
|
||||
mMailInfo.recipients(recipients);
|
||||
for(int rcptIndex=0;rcptIndex<recipients.size();rcptIndex++)rcpt(recipients[rcptIndex]);
|
||||
headerString=String(STRING_TO)+mMailInfo.toField();
|
||||
mailData.insert(&headerString);
|
||||
headerString=String(STRING_REPLYTO)+mMailInfo.reversePath();
|
||||
mailData.insert(&headerString);
|
||||
headerString=String(STRING_SUBJECT)+(mMailInfo.subjectField().isNull()?String("<no subject>"):mMailInfo.subjectField());
|
||||
mailData.insert(&headerString);
|
||||
SystemTime systemTime;
|
||||
headerString=String(STRING_DATE)+systemTime.toString();
|
||||
mailData.insert(&headerString);
|
||||
for(int lineIndex=0;lineIndex<mMailInfo.mailData().size();lineIndex++)mailData.insert(&mMailInfo.mailData()[lineIndex]);
|
||||
mailData+=mAttachment;
|
||||
data(mailData);
|
||||
quit();
|
||||
mAttachment.remove();
|
||||
mStatusBar->setText(STRING_MAILSENT);
|
||||
clearEditControl();
|
||||
}
|
||||
|
||||
void MailDlg::initializeRecipients(void)
|
||||
{
|
||||
MailReg mailReg;
|
||||
Block<String> strBlock;
|
||||
|
||||
if(!mCommandLine.isNull())DWindow::sendMessage(MailTo,CB_INSERTSTRING,-1,(LPARAM)(LPSTR)mCommandLine);
|
||||
mailReg.getRecipients(strBlock);
|
||||
for(int itemIndex=0;itemIndex<strBlock.size();itemIndex++)DWindow::sendMessage(MailTo,CB_INSERTSTRING,-1,(LPARAM)(LPSTR)strBlock[itemIndex]);
|
||||
if(!mCommandLine.isNull())DWindow::sendMessage(MailTo,CB_SELECTSTRING,0,(LPARAM)(LPSTR)mCommandLine);
|
||||
else if(strBlock.size())DWindow::sendMessage(MailTo,CB_SELECTSTRING,0,(LPARAM)(LPSTR)strBlock[0]);
|
||||
}
|
||||
|
||||
void MailDlg::initializeReversePaths(void)
|
||||
{
|
||||
MailReg mailReg;
|
||||
Block<String> strBlock;
|
||||
mailReg.getReversePaths(strBlock);
|
||||
for(int itemIndex=0;itemIndex<strBlock.size();itemIndex++)DWindow::sendMessage(MailFrom,CB_INSERTSTRING,-1,(LPARAM)(LPSTR)strBlock[itemIndex]);
|
||||
if(strBlock.size())DWindow::sendMessage(MailFrom,CB_SELECTSTRING,0,(LPARAM)(LPSTR)strBlock[0]);
|
||||
}
|
||||
|
||||
void MailDlg::enableControls(BOOL enableFlag)
|
||||
{
|
||||
enable(IDCANCEL,enableFlag);
|
||||
enable(IDOK,enableFlag);
|
||||
enable(MailTo,enableFlag);
|
||||
enable(MailFrom,enableFlag);
|
||||
enable(MailText,enableFlag);
|
||||
enable(MailSubject,enableFlag);
|
||||
enable(MailAttach,enableFlag);
|
||||
}
|
||||
|
||||
void MailDlg::clearEditControl(void)
|
||||
{
|
||||
DWindow::sendMessage(MailText,WM_SETTEXT,0,0L);
|
||||
}
|
||||
|
||||
void MailDlg::message(const String &messageString)
|
||||
{
|
||||
if(!mStatusBar.isOkay())return;
|
||||
mStatusBar->setText(messageString);
|
||||
}
|
||||
|
||||
void MailDlg::message(Block<String> &messageStrings)
|
||||
{
|
||||
if(!mStatusBar.isOkay())return;
|
||||
for(int lineIndex=0;lineIndex<messageStrings.size();lineIndex++)
|
||||
mStatusBar->setText(messageStrings[lineIndex]);
|
||||
}
|
||||
64
smtp/MAILDLG.HPP
Normal file
64
smtp/MAILDLG.HPP
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef _SMTP_MAILDLG_HPP_
|
||||
#define _SMTP_MAILDLG_HPP_
|
||||
#ifndef _COMMON_DWINDOW_HPP_
|
||||
#include <common/dwindow.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_MAIL_HPP_
|
||||
#include <smtp/mail.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_MAILINFO_HPP_
|
||||
#include <smtp/mailinfo.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_SMTPTHREAD_HPP_
|
||||
#include <smtp/smtpthrd.hpp>
|
||||
#endif
|
||||
|
||||
class MailInfo;
|
||||
class StatusBar;
|
||||
|
||||
class MailDlg : public DWindow, public SMTPThread
|
||||
{
|
||||
public:
|
||||
MailDlg(void);
|
||||
virtual ~MailDlg();
|
||||
BOOL perform(const String &strCommandLine);
|
||||
protected:
|
||||
virtual void message(const String &messageString);
|
||||
virtual void message(Block<String> &messageStrings);
|
||||
private:
|
||||
enum {MailTo=MAIL_TO,MailText=MAIL_TEXT,MailSubject=MAIL_SUBJECT,MailFrom=MAIL_FROM,MailServer=MAIL_SERVER,MailAttach=MAIL_ATTACH};
|
||||
MailDlg &operator=(const MailDlg &someMailDlg);
|
||||
BOOL getFields(void);
|
||||
void sendMail(void);
|
||||
void handleMailServer(void);
|
||||
void handleMailTo(CallbackData &someCallbackData);
|
||||
void handleMailFrom(CallbackData &someCallbackData);
|
||||
void handleMailAttach(void);
|
||||
void clearEditControl(void);
|
||||
void initializeRecipients(void);
|
||||
void initializeReversePaths(void);
|
||||
void enableControls(BOOL enableFlag);
|
||||
CallbackData::ReturnType initHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType destroyHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType closeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType dlgCodeHandler(CallbackData &someCallbackData);
|
||||
DWORD preOpenHandler(ThreadMessage &someThreadMessage);
|
||||
DWORD openHandler(ThreadMessage &someThreadMessage);
|
||||
|
||||
ThreadCallback<MailDlg> mOpenHandler;
|
||||
ThreadCallback<MailDlg> mPreOpenHandler;
|
||||
Callback<MailDlg> mInitHandler;
|
||||
Callback<MailDlg> mDestroyHandler;
|
||||
Callback<MailDlg> mCommandHandler;
|
||||
Callback<MailDlg> mCloseHandler;
|
||||
Callback<MailDlg> mDlgCodeHandler;
|
||||
SmartPointer<StatusBar> mStatusBar;
|
||||
MailInfo mMailInfo;
|
||||
Block<String> mAttachment;
|
||||
String mCommandLine;
|
||||
};
|
||||
#endif
|
||||
21
smtp/MAILINFO.CPP
Normal file
21
smtp/MAILINFO.CPP
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <smtp/mailinfo.hpp>
|
||||
|
||||
BOOL MailInfo::recipients(Block<String> &recipients)const
|
||||
{
|
||||
String lineString;
|
||||
char *ptrString;
|
||||
|
||||
recipients.remove();
|
||||
lineString=toField();
|
||||
lineString.replaceToken(';',' ');
|
||||
lineString.replaceToken(',',' ');
|
||||
ptrString=(LPSTR)lineString;
|
||||
ptrString=::strtok(ptrString," \0");
|
||||
while(TRUE)
|
||||
{
|
||||
if(!ptrString)break;
|
||||
recipients.insert(&String(ptrString));
|
||||
ptrString=::strtok(0," \0");
|
||||
}
|
||||
return (recipients.size()?TRUE:FALSE);
|
||||
}
|
||||
168
smtp/MAILINFO.HPP
Normal file
168
smtp/MAILINFO.HPP
Normal file
@@ -0,0 +1,168 @@
|
||||
#ifndef _SMTP_MAILINFO_HPP_
|
||||
#define _SMTP_MAILINFO_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
|
||||
class MailInfo
|
||||
{
|
||||
public:
|
||||
MailInfo(void);
|
||||
MailInfo(const MailInfo &someMailInfo);
|
||||
MailInfo &operator=(const MailInfo &someMailInfo);
|
||||
BOOL operator==(const MailInfo &someMailInfo)const;
|
||||
virtual ~MailInfo();
|
||||
const String &reversePath(void)const;
|
||||
void reversePath(const String &reversePath);
|
||||
const String &subjectField(void)const;
|
||||
void subjectField(const String &subjectField);
|
||||
const String &carbonField(void)const;
|
||||
void carbonField(const String &carbonField);
|
||||
const String &dateField(void)const;
|
||||
void dateField(const String &dateField);
|
||||
const String &toField(void)const;
|
||||
void toField(const String &toField);
|
||||
const String &server(void)const;
|
||||
void server(const String &serverName);
|
||||
BOOL recipients(Block<String> &recipients)const;
|
||||
void mailData(Block<String> &mailData);
|
||||
Block<String> &mailData(void);
|
||||
private:
|
||||
String mReversePath;
|
||||
String mSubjectField;
|
||||
String mCarbonField;
|
||||
String mDateField;
|
||||
String mToField;
|
||||
String mServer;
|
||||
Block<String> mMailData;
|
||||
};
|
||||
|
||||
inline
|
||||
MailInfo::MailInfo(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
MailInfo::MailInfo(const MailInfo &someMailInfo)
|
||||
{
|
||||
*this=someMailInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
MailInfo &MailInfo::operator=(const MailInfo &someMailInfo)
|
||||
{
|
||||
reversePath(someMailInfo.reversePath());
|
||||
subjectField(someMailInfo.subjectField());
|
||||
carbonField(someMailInfo.carbonField());
|
||||
dateField(someMailInfo.dateField());
|
||||
toField(someMailInfo.toField());
|
||||
server(someMailInfo.server());
|
||||
mMailData=someMailInfo.mMailData;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL MailInfo::operator==(const MailInfo &someMailInfo)const
|
||||
{
|
||||
return (reversePath()==someMailInfo.reversePath()&&
|
||||
subjectField()==someMailInfo.subjectField()&&
|
||||
carbonField()==someMailInfo.carbonField()&&
|
||||
dateField()==someMailInfo.dateField()&&
|
||||
toField()==someMailInfo.toField()&&
|
||||
server()==someMailInfo.server()&&
|
||||
mMailData==someMailInfo.mMailData);
|
||||
}
|
||||
|
||||
inline
|
||||
MailInfo::~MailInfo()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::reversePath(void)const
|
||||
{
|
||||
return mReversePath;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::reversePath(const String &reversePath)
|
||||
{
|
||||
mReversePath=reversePath;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::subjectField(void)const
|
||||
{
|
||||
return mSubjectField;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::subjectField(const String &subjectField)
|
||||
{
|
||||
mSubjectField=subjectField;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::carbonField(void)const
|
||||
{
|
||||
return mCarbonField;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::carbonField(const String &carbonField)
|
||||
{
|
||||
mCarbonField=carbonField;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::dateField(void)const
|
||||
{
|
||||
return mDateField;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::dateField(const String &dateField)
|
||||
{
|
||||
mDateField=dateField;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::toField(void)const
|
||||
{
|
||||
return mToField;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::toField(const String &toField)
|
||||
{
|
||||
mToField=toField;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailInfo::server(void)const
|
||||
{
|
||||
return mServer;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::server(const String &serverName)
|
||||
{
|
||||
mServer=serverName;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailInfo::mailData(Block<String> &mailData)
|
||||
{
|
||||
mMailData=mailData;
|
||||
}
|
||||
|
||||
inline
|
||||
Block<String> &MailInfo::mailData(void)
|
||||
{
|
||||
return mMailData;
|
||||
}
|
||||
#endif
|
||||
|
||||
118
smtp/MAILREG.CPP
Normal file
118
smtp/MAILREG.CPP
Normal file
@@ -0,0 +1,118 @@
|
||||
#include <smtp/mailreg.hpp>
|
||||
#include <common/string.hpp>
|
||||
#include <common/block.hpp>
|
||||
#include <common/stdio.hpp>
|
||||
|
||||
BOOL MailReg::getRecipients(Block<String> &recipients)
|
||||
{
|
||||
DWORD itemIndex(0);
|
||||
RegKey regKey;
|
||||
String recipient;
|
||||
|
||||
recipients.remove();
|
||||
if(!regKey.openKey(STRING_MAILRECIPIENTSKEYNAME))return FALSE;
|
||||
while(regKey.enumValue(itemIndex++,String(STRING_RECIPIENTS),recipient))recipients.insert(&recipient);
|
||||
return (recipients.size()?TRUE:FALSE);
|
||||
}
|
||||
|
||||
void MailReg::setRecipients(const Block<String> &recipients)
|
||||
{
|
||||
String namePrefix;
|
||||
RegKey regKey;
|
||||
|
||||
if(!regKey.openKey(STRING_MAILRECIPIENTSKEYNAME))
|
||||
{
|
||||
regKey.createKey(STRING_MAILRECIPIENTSKEYNAME,"");
|
||||
regKey.openKey(STRING_MAILRECIPIENTSKEYNAME);
|
||||
}
|
||||
for(int lineIndex=0;lineIndex<recipients.size();lineIndex++)
|
||||
{
|
||||
::sprintf(namePrefix,"R%02d",lineIndex);
|
||||
regKey.setValue(namePrefix,String(((Block<String>&)recipients)[lineIndex]));
|
||||
}
|
||||
}
|
||||
|
||||
BOOL MailReg::addRecipient(const String &recipient)
|
||||
{
|
||||
Block<String> recipients;
|
||||
String namePrefix;
|
||||
RegKey regKey;
|
||||
|
||||
if(recipient.isNull())return FALSE;
|
||||
getRecipients(recipients);
|
||||
if(isInBlock(recipient,recipients)){setRecipients(recipients);return FALSE;}
|
||||
::sprintf(namePrefix,"R%02d",recipients.size());
|
||||
if(!regKey.openKey(STRING_MAILRECIPIENTSKEYNAME))
|
||||
{
|
||||
regKey.createKey(STRING_MAILRECIPIENTSKEYNAME,"");
|
||||
regKey.openKey(STRING_MAILRECIPIENTSKEYNAME);
|
||||
}
|
||||
regKey.setValue(namePrefix,recipient);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL MailReg::getReversePaths(Block<String> &reversePaths)
|
||||
{
|
||||
DWORD itemIndex(0);
|
||||
RegKey regKey;
|
||||
String reversePath;
|
||||
|
||||
reversePaths.remove();
|
||||
if(!regKey.openKey(STRING_MAILREVERSEPATHKEYNAME))return FALSE;
|
||||
while(regKey.enumValue(itemIndex++,String(STRING_REVERSEPATH),reversePath))reversePaths.insert(&reversePath);
|
||||
return (reversePaths.size()?TRUE:FALSE);
|
||||
}
|
||||
|
||||
void MailReg::setReversePaths(const Block<String> &reversePaths)
|
||||
{
|
||||
String namePrefix;
|
||||
RegKey regKey;
|
||||
|
||||
if(!regKey.openKey(STRING_MAILREVERSEPATHKEYNAME))
|
||||
{
|
||||
regKey.createKey(STRING_MAILREVERSEPATHKEYNAME,"");
|
||||
regKey.openKey(STRING_MAILREVERSEPATHKEYNAME);
|
||||
}
|
||||
for(int lineIndex=0;lineIndex<reversePaths.size();lineIndex++)
|
||||
{
|
||||
::sprintf(namePrefix,"R%02d",lineIndex);
|
||||
regKey.setValue(namePrefix,String(((Block<String>&)reversePaths)[lineIndex]));
|
||||
}
|
||||
}
|
||||
|
||||
BOOL MailReg::addReversePath(const String &reversePath)
|
||||
{
|
||||
Block<String> reversePaths;
|
||||
String namePrefix;
|
||||
RegKey regKey;
|
||||
|
||||
if(reversePath.isNull())return FALSE;
|
||||
getReversePaths(reversePaths);
|
||||
if(isInBlock(reversePath,reversePaths)){setReversePaths(reversePaths);return FALSE;}
|
||||
::sprintf(namePrefix,"R%02d",reversePaths.size());
|
||||
if(!regKey.openKey(STRING_MAILREVERSEPATHKEYNAME))
|
||||
{
|
||||
regKey.createKey(STRING_MAILREVERSEPATHKEYNAME,"");
|
||||
regKey.openKey(STRING_MAILREVERSEPATHKEYNAME);
|
||||
}
|
||||
regKey.setValue(namePrefix,reversePath);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL MailReg::isInBlock(const String &string,Block<String> &strings)
|
||||
{
|
||||
for(int itemIndex=0;itemIndex<strings.size();itemIndex++)
|
||||
{
|
||||
if(string==strings[itemIndex])
|
||||
{
|
||||
if(itemIndex)
|
||||
{
|
||||
String currTop=strings[0];
|
||||
strings[0]=string;
|
||||
strings[itemIndex]=currTop;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
81
smtp/MAILREG.HPP
Normal file
81
smtp/MAILREG.HPP
Normal file
@@ -0,0 +1,81 @@
|
||||
#ifndef _SMTP_MAILREG_HPP_
|
||||
#define _SMTP_MAILREG_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_REGKEY_HPP_
|
||||
#include <common/regkey.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_MAIL_HPP_
|
||||
#include <smtp/mail.hpp>
|
||||
#endif
|
||||
|
||||
class MailReg
|
||||
{
|
||||
public:
|
||||
MailReg(void);
|
||||
MailReg(const MailReg &someMailReg);
|
||||
virtual ~MailReg();
|
||||
MailReg &operator=(const MailReg &someMailReg);
|
||||
BOOL getRecipients(Block<String> &recipients);
|
||||
void setRecipients(const Block<String> &recipients);
|
||||
BOOL addRecipient(const String &recipient);
|
||||
BOOL getReversePaths(Block<String> &reversePaths);
|
||||
void setReversePaths(const Block<String> &reversePaths);
|
||||
BOOL addReversePath(const String &reversePath);
|
||||
const String &server(void)const;
|
||||
void server(const String &serverName);
|
||||
private:
|
||||
BOOL isInBlock(const String &recipient,Block<String> &recipients);
|
||||
|
||||
RegKey mRegKey;
|
||||
String mMailKeyName;
|
||||
String mServerKeyName;
|
||||
String mRecipientsKeyName;
|
||||
String mServerName;
|
||||
};
|
||||
|
||||
inline
|
||||
MailReg::MailReg(void)
|
||||
: mMailKeyName(STRING_MAILKEYNAME), mServerKeyName(STRING_SERVERKEYNAME)
|
||||
{
|
||||
if(!mRegKey.openKey(mMailKeyName))
|
||||
{
|
||||
mRegKey.createKey(mMailKeyName,"");
|
||||
mRegKey.openKey(mMailKeyName);
|
||||
}
|
||||
mRegKey.queryValue(mServerKeyName,mServerName);
|
||||
}
|
||||
|
||||
inline
|
||||
MailReg::MailReg(const MailReg &someMailReg)
|
||||
: mMailKeyName(STRING_MAILKEYNAME), mServerKeyName(STRING_SERVERKEYNAME)
|
||||
{
|
||||
*this=someMailReg;
|
||||
}
|
||||
|
||||
inline
|
||||
MailReg::~MailReg()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
MailReg &MailReg::operator=(const MailReg &someMailReg)
|
||||
{
|
||||
server(someMailReg.server());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &MailReg::server(void)const
|
||||
{
|
||||
return mServerName;
|
||||
}
|
||||
|
||||
inline
|
||||
void MailReg::server(const String &serverName)
|
||||
{
|
||||
mServerName=serverName;
|
||||
mRegKey.setValue(mServerKeyName,mServerName);
|
||||
}
|
||||
#endif
|
||||
11
smtp/MAIN.CPP
Normal file
11
smtp/MAIN.CPP
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <smtp/maildlg.hpp>
|
||||
#include <smtp/mailreg.hpp>
|
||||
|
||||
int PASCAL WinMain(HINSTANCE /*hInstance*/,HINSTANCE /*hPrevInstance*/,LPSTR lpszCmdLine,int /*nCmdShow*/)
|
||||
{
|
||||
MailDlg mailDlg;
|
||||
String strString(lpszCmdLine);
|
||||
if(!strString.isNull()&&strString.strstr("mailto:"))strString=strString.betweenString(':',0);
|
||||
mailDlg.perform(strString);
|
||||
return FALSE;
|
||||
}
|
||||
66
smtp/MAIN.HPP
Normal file
66
smtp/MAIN.HPP
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef _HTTP_MAIN_HPP_
|
||||
#define _HTTP_MAIN_HPP_
|
||||
#include <common/windows.hpp>
|
||||
|
||||
class Main
|
||||
{
|
||||
public:
|
||||
static HINSTANCE processInstance(HWND hWnd);
|
||||
static HINSTANCE processInstance(void);
|
||||
static HINSTANCE previousProcessInstance(void);
|
||||
static void processInstance(HINSTANCE processInstance);
|
||||
static void previousProcessInstance(HINSTANCE previousProcessInstance);
|
||||
static void cmdShow(int nCmdShow);
|
||||
private:
|
||||
static HINSTANCE smhInstance;
|
||||
static HINSTANCE smhPrevInstance;
|
||||
static int smnCmdShow;
|
||||
};
|
||||
|
||||
inline
|
||||
void Main::processInstance(HINSTANCE hProcessInstance)
|
||||
{
|
||||
smhInstance=hProcessInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
void Main::previousProcessInstance(HINSTANCE previousProcessInstance)
|
||||
{
|
||||
smhPrevInstance=previousProcessInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
void Main::cmdShow(int nCmdShow)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
HINSTANCE Main::processInstance(void)
|
||||
{
|
||||
return smhInstance;
|
||||
}
|
||||
|
||||
inline
|
||||
HINSTANCE Main::previousProcessInstance(void)
|
||||
{
|
||||
return smhPrevInstance;
|
||||
}
|
||||
|
||||
#if defined(__FLAT__)
|
||||
inline
|
||||
HINSTANCE Main::processInstance(HWND hWnd)
|
||||
{
|
||||
return (HINSTANCE)::GetWindowLong(hWnd,GWL_HINSTANCE);
|
||||
}
|
||||
#else
|
||||
inline
|
||||
HINSTANCE Main::processInstance(HWND hWnd)
|
||||
{
|
||||
return (HINSTANCE)::GetWindowWord(hWnd,GWW_HINSTANCE);
|
||||
}
|
||||
#endif
|
||||
#define WM_REACTIVATE WM_USER+1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
52
smtp/PTREX.HPP
Normal file
52
smtp/PTREX.HPP
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef _SMTP_SMARTPOINTEREX_HPP_
|
||||
#define _SMTP_SMARTPOINTEREX_HPP_
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
class SmartPointerEx : public SmartPointer<T>
|
||||
{
|
||||
public:
|
||||
SmartPointerEx(void);
|
||||
SmartPointerEx(T FAR *lpSmartPointer,PointerDisposition::Disposition disposition=PointerDisposition::Assume);
|
||||
SmartPointerEx(const SmartPointer<T> &someSmartPointer);
|
||||
virtual ~SmartPointerEx();
|
||||
int operator < (const SmartPointerEx<T> &someSmartPointerEx)const;
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(void)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(T *lpSmartPointer,PointerDisposition::Disposition disposition)
|
||||
: SmartPointer<T>(lpSmartPointer,disposition)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::SmartPointerEx(const SmartPointer<T> &someSmartPointer)
|
||||
{
|
||||
(SmartPointer<T>&)*this=someSmartPointer;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
SmartPointerEx<T>::~SmartPointerEx()
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
int SmartPointerEx<T>::operator <(const SmartPointerEx<T> &someSmartPointerEx)const
|
||||
{
|
||||
return *((T FAR*)((SmartPointer<T>&)*this))<*((T FAR*)((SmartPointer<T>&)someSmartPointerEx));
|
||||
}
|
||||
#endif
|
||||
168
smtp/RESPONSE.CPP
Normal file
168
smtp/RESPONSE.CPP
Normal file
@@ -0,0 +1,168 @@
|
||||
#include <smtp/response.hpp>
|
||||
#include <common/string.hpp>
|
||||
#include <bsptree/btree.hpp>
|
||||
|
||||
SMTPResponse::SMTPResponse(void)
|
||||
{
|
||||
createResponse();
|
||||
}
|
||||
|
||||
SMTPResponse::~SMTPResponse()
|
||||
{
|
||||
}
|
||||
|
||||
SMTPResponse::SMTPResponse(const SMTPResponse &/*someSMTPResponse*/)
|
||||
{ // private implementation
|
||||
}
|
||||
|
||||
SMTPResponse &SMTPResponse::operator=(const SMTPResponse &/*someSMTPResponse*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOL SMTPResponse::isInResponse(const String &responseString,RspType responseType)
|
||||
{
|
||||
String srchString(responseString);
|
||||
|
||||
return mSMTPResponseTree[responseType].searchItem(StringPointer(&srchString));
|
||||
}
|
||||
|
||||
void SMTPResponse::createResponse(void)
|
||||
{
|
||||
createResponseBlock();
|
||||
createResponseTree();
|
||||
}
|
||||
|
||||
void SMTPResponse::createResponseTree(void)
|
||||
{
|
||||
mSMTPResponseTree.size(NakQuit+1);
|
||||
mSMTPResponseTree[AckConnect].insert(StringPointer(&mSMTPResponse[R211]));
|
||||
mSMTPResponseTree[AckConnect].insert(StringPointer(&mSMTPResponse[R220]));
|
||||
mSMTPResponseTree[NakConnect].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckHelo].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakHelo].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakHelo].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakHelo].insert(StringPointer(&mSMTPResponse[R504]));
|
||||
mSMTPResponseTree[NakHelo].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckMail].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakMail].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckRecipient].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[AckRecipient].insert(StringPointer(&mSMTPResponse[R251]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R550]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R551]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R553]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R450]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R503]));
|
||||
mSMTPResponseTree[NakRecipient].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckData].insert(StringPointer(&mSMTPResponse[R354]));
|
||||
mSMTPResponseTree[AckData].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R554]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R554]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R503]));
|
||||
mSMTPResponseTree[NakData].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckReset].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakReset].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakReset].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakReset].insert(StringPointer(&mSMTPResponse[R504]));
|
||||
mSMTPResponseTree[NakReset].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckSend].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakSend].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckSendOrMail].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakSendOrMail].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckSendAndMail].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R552]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R451]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R452]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakSendAndMail].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckVerify].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[AckVerify].insert(StringPointer(&mSMTPResponse[R251]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R550]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R551]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R553]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R504]));
|
||||
mSMTPResponseTree[NakVerify].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckExpand].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R550]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R504]));
|
||||
mSMTPResponseTree[NakExpand].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckHelp].insert(StringPointer(&mSMTPResponse[R211]));
|
||||
mSMTPResponseTree[AckHelp].insert(StringPointer(&mSMTPResponse[R214]));
|
||||
mSMTPResponseTree[NakHelp].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakHelp].insert(StringPointer(&mSMTPResponse[R501]));
|
||||
mSMTPResponseTree[NakHelp].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakHelp].insert(StringPointer(&mSMTPResponse[R504]));
|
||||
mSMTPResponseTree[NakHelp].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckNoop].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakNoop].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakNoop].insert(StringPointer(&mSMTPResponse[R421]));
|
||||
mSMTPResponseTree[AckTurn].insert(StringPointer(&mSMTPResponse[R250]));
|
||||
mSMTPResponseTree[NakTurn].insert(StringPointer(&mSMTPResponse[R502]));
|
||||
mSMTPResponseTree[NakTurn].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
mSMTPResponseTree[NakTurn].insert(StringPointer(&mSMTPResponse[R503]));
|
||||
mSMTPResponseTree[AckQuit].insert(StringPointer(&mSMTPResponse[R221]));
|
||||
mSMTPResponseTree[NakQuit].insert(StringPointer(&mSMTPResponse[R500]));
|
||||
}
|
||||
|
||||
void SMTPResponse::createResponseBlock(void)
|
||||
{
|
||||
mSMTPResponse.remove();
|
||||
mSMTPResponse.insert(&String("211"));
|
||||
mSMTPResponse.insert(&String("214"));
|
||||
mSMTPResponse.insert(&String("220"));
|
||||
mSMTPResponse.insert(&String("221"));
|
||||
mSMTPResponse.insert(&String("250"));
|
||||
mSMTPResponse.insert(&String("251"));
|
||||
mSMTPResponse.insert(&String("354"));
|
||||
mSMTPResponse.insert(&String("421"));
|
||||
mSMTPResponse.insert(&String("450"));
|
||||
mSMTPResponse.insert(&String("451"));
|
||||
mSMTPResponse.insert(&String("452"));
|
||||
mSMTPResponse.insert(&String("500"));
|
||||
mSMTPResponse.insert(&String("501"));
|
||||
mSMTPResponse.insert(&String("502"));
|
||||
mSMTPResponse.insert(&String("503"));
|
||||
mSMTPResponse.insert(&String("504"));
|
||||
mSMTPResponse.insert(&String("550"));
|
||||
mSMTPResponse.insert(&String("551"));
|
||||
mSMTPResponse.insert(&String("552"));
|
||||
mSMTPResponse.insert(&String("553"));
|
||||
mSMTPResponse.insert(&String("554"));
|
||||
}
|
||||
|
||||
45
smtp/RESPONSE.HPP
Normal file
45
smtp/RESPONSE.HPP
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _SMTP_SMTPRESPONSE_HPP_
|
||||
#define _SMTP_SMTPRESPONSE_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_ARRAY_HPP_
|
||||
#include <common/array.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_SMARTPOINTEREX_HPP_
|
||||
#include <smtp/ptrex.hpp>
|
||||
#endif
|
||||
#ifndef _BSPTREE_BTREE_HPP_
|
||||
#include <bsptree/btree.hpp>
|
||||
#endif
|
||||
|
||||
class SMTPResponse
|
||||
{
|
||||
public:
|
||||
enum RspOrd{R211,R214,R220,R221,R250,R251,R354,R421,R450,R451,R452,R500,R501,
|
||||
R502,R503,R504,R550,R551,R552,R553,R554};
|
||||
enum RspType{AckConnect,NakConnect,AckHelo,NakHelo,AckMail,NakMail,AckRecipient,
|
||||
NakRecipient,AckData,NakData,AckReset,NakReset,AckSend,NakSend,AckSendOrMail,
|
||||
NakSendOrMail,AckSendAndMail,NakSendAndMail,AckVerify,NakVerify,AckExpand,
|
||||
NakExpand,AckHelp,NakHelp,AckNoop,NakNoop,AckTurn,NakTurn,AckQuit,NakQuit};
|
||||
SMTPResponse(void);
|
||||
virtual ~SMTPResponse();
|
||||
BOOL isInResponse(const String &responseString,RspType responseType);
|
||||
private:
|
||||
typedef Block<String> ResponseBlock;
|
||||
typedef SmartPointerEx<String> StringPointer;
|
||||
typedef BTree<StringPointer> ResponseTree;
|
||||
|
||||
SMTPResponse(const SMTPResponse &someSMTPResponse);
|
||||
SMTPResponse &operator=(const SMTPResponse &someSMTPResponse);
|
||||
void createResponse(void);
|
||||
void createResponseBlock(void);
|
||||
void createResponseTree(void);
|
||||
|
||||
ResponseBlock mSMTPResponse;
|
||||
Array<ResponseTree> mSMTPResponseTree;
|
||||
};
|
||||
#endif
|
||||
BIN
smtp/Release/vc50.idb
Normal file
BIN
smtp/Release/vc50.idb
Normal file
Binary file not shown.
1158
smtp/SCRAPS.TXT
Normal file
1158
smtp/SCRAPS.TXT
Normal file
File diff suppressed because it is too large
Load Diff
1526
smtp/SMTP.BAK
Normal file
1526
smtp/SMTP.BAK
Normal file
File diff suppressed because it is too large
Load Diff
BIN
smtp/SMTP.BMP
Normal file
BIN
smtp/SMTP.BMP
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
344
smtp/SMTP.CPP
Normal file
344
smtp/SMTP.CPP
Normal file
@@ -0,0 +1,344 @@
|
||||
#include <smtp/smtp.hpp>
|
||||
#include <socket/hostent.hpp>
|
||||
#include <socket/servent.hpp>
|
||||
|
||||
SMTPClient::SMTPClient(void)
|
||||
: mSpace(" ")
|
||||
{
|
||||
createCmds();
|
||||
}
|
||||
|
||||
SMTPClient::~SMTPClient()
|
||||
{
|
||||
mSMTPControl.destroy();
|
||||
}
|
||||
|
||||
BOOL SMTPClient::open(const String &hostName)
|
||||
{
|
||||
HostEnt hostEntry;
|
||||
ServEnt serverEntry;
|
||||
Block<String> responseLines;
|
||||
INETSocketAddress internetSocketAddress;
|
||||
|
||||
if(hostName.isNull())return FALSE;
|
||||
if(mSMTPControl.isConnected())mSMTPControl.destroy();
|
||||
message(String("trying ")+hostName+String("..."));
|
||||
if(!mWSASystem.isInitialized()){message("WINSOCK initialization failure.");return FALSE;}
|
||||
InternetAddress internetAddress(hostName);
|
||||
if(!internetAddress.isZero()){if(!hostEntry.hostByAddress(internetAddress)){message(String("no DNS entry for ")+hostName+String("."));return FALSE;}}
|
||||
else if(!hostEntry.hostByName(hostName)){message(String("no DNS entry for ")+hostName+String("."));return FALSE;}
|
||||
if(!internetAddress.isZero()){if(!hostEntry.hostByAddress(internetAddress)){message(String("no DNS entry for ")+hostName);return FALSE;}}
|
||||
else if(!hostEntry.hostByName(hostName)){message(String("no DNS entry for ")+hostName);return FALSE;}
|
||||
message(String("connect...")+String("'")+hostEntry.hostName()+String("' (")+(String)(hostEntry.addresses())[0]+String(")"));
|
||||
internetSocketAddress.internetAddress((hostEntry.addresses())[0]);
|
||||
if(serverEntry.serviceByName("smtp","tcp"))
|
||||
{
|
||||
if(!mSMTPControl.create()){message("unable to create socket.");return FALSE;}
|
||||
internetSocketAddress.family(PF_INET);
|
||||
internetSocketAddress.port(serverEntry.port());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!mSMTPControl.create()){message("unable to create socket.");return FALSE;}
|
||||
internetSocketAddress.family(PF_INET);
|
||||
internetSocketAddress.port(htons(SMTPPort));
|
||||
}
|
||||
if(!mSMTPControl.connect(internetSocketAddress)){message("unable to connect to smtp server");return FALSE;}
|
||||
mSMTPControl.getSocketName(internetSocketAddress);
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines)||!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckConnect))
|
||||
{
|
||||
mSMTPControl.destroy();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::helo(const String &domainName)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||domainName.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Helo];
|
||||
controlData+=mSpace;
|
||||
controlData+=domainName;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckHelo))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::quit(void)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
controlData=mSMTPCmds[Quit];
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckQuit))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::mail(const String &reversePath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||reversePath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Mail];
|
||||
controlData+=mSpace;
|
||||
controlData+=mSMTPCmds[From];
|
||||
controlData+=reversePath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckMail))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::rcpt(const String &forwardPath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||forwardPath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Recipient];
|
||||
controlData+=mSpace;
|
||||
controlData+=mSMTPCmds[To];
|
||||
controlData+=forwardPath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckRecipient))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::data(const Block<String> &mailData)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||!mailData.size())return FALSE;
|
||||
controlData=mSMTPCmds[Data];
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckData))return FALSE;
|
||||
for(int lineIndex=0;lineIndex<mailData.size();lineIndex++)mSMTPControl.send(((Block<String>&)mailData)[lineIndex]);
|
||||
mSMTPControl.send(".");
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckData))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::verify(const String &forwardPath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||forwardPath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Verify];
|
||||
controlData+=mSpace;
|
||||
controlData+=forwardPath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckVerify))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::expand(const String &mailList)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||mailList.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Expand];
|
||||
controlData+=mSpace;
|
||||
controlData+=mailList;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckExpand))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::send(const String &reversePath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||reversePath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[Send];
|
||||
controlData+=mSpace;
|
||||
controlData+=mSMTPCmds[From];
|
||||
controlData+=reversePath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckSend))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::sendOrMail(const String &reversePath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||reversePath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[SendOrMail];
|
||||
controlData+=mSpace;
|
||||
controlData+=mSMTPCmds[From];
|
||||
controlData+=reversePath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckSendOrMail))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::sendAndMail(const String &reversePath)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected()||reversePath.isNull())return FALSE;
|
||||
controlData=mSMTPCmds[SendAndMail];
|
||||
controlData+=mSpace;
|
||||
controlData+=mSMTPCmds[From];
|
||||
controlData+=reversePath;
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckSendAndMail))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::reset(void)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
controlData=mSMTPCmds[Reset];
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckReset))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::help(const String &commandName)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
controlData=mSMTPCmds[Help];
|
||||
if(!commandName.isNull())
|
||||
{
|
||||
controlData+=mSpace;
|
||||
controlData+=commandName;
|
||||
}
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckHelp))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::noop(void)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
controlData=mSMTPCmds[Noop];
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckNoop))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SMTPClient::turn(void)
|
||||
{
|
||||
String controlData;
|
||||
Block<String> responseLines;
|
||||
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
controlData=mSMTPCmds[Turn];
|
||||
if(!putControlData(controlData,FALSE))return FALSE;
|
||||
if(!mSMTPControl.receive(responseLines))return FALSE;
|
||||
message(responseLines);
|
||||
if(!responseLines.size()||!isInResponse(responseLines.size()>1?responseLines[0].betweenString(0,'-'):responseLines[0].betweenString(0,' '),SMTPResponse::AckTurn))return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void SMTPClient::createCmds(void)
|
||||
{
|
||||
mSMTPCmds.remove();
|
||||
mSMTPCmds.insert(&String("HELO"));
|
||||
mSMTPCmds.insert(&String("QUIT"));
|
||||
mSMTPCmds.insert(&String("MAIL"));
|
||||
mSMTPCmds.insert(&String("FROM:"));
|
||||
mSMTPCmds.insert(&String("RCPT"));
|
||||
mSMTPCmds.insert(&String("TO:"));
|
||||
mSMTPCmds.insert(&String("DATA"));
|
||||
mSMTPCmds.insert(&String("VRFY"));
|
||||
mSMTPCmds.insert(&String("EXPN"));
|
||||
mSMTPCmds.insert(&String("SEND"));
|
||||
mSMTPCmds.insert(&String("SOML"));
|
||||
mSMTPCmds.insert(&String("SAML"));
|
||||
mSMTPCmds.insert(&String("TURN"));
|
||||
mSMTPCmds.insert(&String("RSET"));
|
||||
mSMTPCmds.insert(&String("HELP"));
|
||||
mSMTPCmds.insert(&String("NOOP"));
|
||||
}
|
||||
|
||||
WORD SMTPClient::putControlData(const String &stringData,WORD waitForResponse)
|
||||
{
|
||||
if(!mSMTPControl.isConnected())return FALSE;
|
||||
if(!mSMTPControl.send(stringData))
|
||||
{
|
||||
mSMTPControl.destroy();
|
||||
String errorString(String("error sending '")+stringData+String("' to SMTP server."));
|
||||
message(errorString);
|
||||
errorString+="\n";
|
||||
::OutputDebugString(errorString);
|
||||
return FALSE;
|
||||
}
|
||||
if(waitForResponse&&!getControlData())
|
||||
{
|
||||
mSMTPControl.destroy();
|
||||
String errorString(String("error reading result of '")+stringData+String("' command from NNTP server."));
|
||||
message(errorString);
|
||||
errorString+="\n";
|
||||
::OutputDebugString(errorString);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
WORD SMTPClient::getControlData(void)
|
||||
{
|
||||
Block<String> responseStrings;
|
||||
mSMTPControl.receive(responseStrings);
|
||||
return responseStrings.size();
|
||||
}
|
||||
|
||||
// virtuals
|
||||
|
||||
void SMTPClient::message(const String &messageString)
|
||||
{
|
||||
}
|
||||
|
||||
void SMTPClient::message(Block<String> &messageStrings)
|
||||
{
|
||||
}
|
||||
80
smtp/SMTP.HPP
Normal file
80
smtp/SMTP.HPP
Normal file
@@ -0,0 +1,80 @@
|
||||
#ifndef _SMTP_SMTPCLIENT_HPP_
|
||||
#define _SMTP_SMTPCLIENT_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_SOCKET_HPP_
|
||||
#include <socket/socket.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_CONSOLE_HPP_
|
||||
#include <common/console.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_SMTPRESPONSE_HPP_
|
||||
#include <smtp/response.hpp>
|
||||
#endif
|
||||
|
||||
class String;
|
||||
|
||||
class SMTPClient
|
||||
{
|
||||
public:
|
||||
SMTPClient(void);
|
||||
virtual ~SMTPClient();
|
||||
BOOL open(const String &hostName);
|
||||
void close(void);
|
||||
BOOL helo(const String &domainName);
|
||||
BOOL mail(const String &reversePath);
|
||||
BOOL rcpt(const String &forwardPath);
|
||||
BOOL data(const Block<String> &mailData);
|
||||
BOOL verify(const String &forwardPath);
|
||||
BOOL expand(const String &mailList);
|
||||
BOOL send(const String &reversePath);
|
||||
BOOL sendOrMail(const String &reversePath);
|
||||
BOOL sendAndMail(const String &reversePath);
|
||||
BOOL help(const String &commandName=String());
|
||||
BOOL noop(void);
|
||||
BOOL reset(void);
|
||||
BOOL turn(void);
|
||||
BOOL quit(void);
|
||||
BOOL isConnected(void)const;
|
||||
protected:
|
||||
virtual void message(const String &messageString);
|
||||
virtual void message(Block<String> &messageStrings);
|
||||
private:
|
||||
enum {SMTPPort=25};
|
||||
enum SMTPCmds{Helo,Quit,Mail,From,Recipient,To,Data,Verify,Expand,Send,SendOrMail,SendAndMail,Turn,Reset,Help,Noop};
|
||||
SMTPClient(const SMTPClient &someSMTPClient);
|
||||
SMTPClient &operator=(const SMTPClient &someSMTPClient);
|
||||
WORD putControlData(const String &stringData,WORD waitForResponse=TRUE);
|
||||
BOOL isInResponse(const String &responseString,SMTPResponse::RspType responseType);
|
||||
WORD getControlData(void);
|
||||
void createCmds(void);
|
||||
|
||||
SMTPResponse mSMTPResponse;
|
||||
Socket mSMTPControl;
|
||||
WSASystem mWSASystem;
|
||||
Block<String> mSMTPCmds;
|
||||
String mSpace;
|
||||
};
|
||||
|
||||
inline
|
||||
BOOL SMTPClient::isInResponse(const String &responseString,SMTPResponse::RspType responseType)
|
||||
{
|
||||
return mSMTPResponse.isInResponse(responseString,responseType);
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL SMTPClient::isConnected(void)const
|
||||
{
|
||||
return mSMTPControl.isConnected();
|
||||
}
|
||||
|
||||
inline
|
||||
void SMTPClient::close(void)
|
||||
{
|
||||
mSMTPControl.destroy();
|
||||
}
|
||||
#endif
|
||||
BIN
smtp/SMTP.ICO
Normal file
BIN
smtp/SMTP.ICO
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
53
smtp/SMTP.PLG
Normal file
53
smtp/SMTP.PLG
Normal file
@@ -0,0 +1,53 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: smtp - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP33.tmp" with contents
|
||||
[
|
||||
/nologo /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp"\work\exe\msvc42.pch" /YX"windows.h" /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /c
|
||||
"D:\work\smtp\maildlg.cpp"
|
||||
"D:\work\smtp\mailreg.cpp"
|
||||
"D:\work\smtp\Main.cpp"
|
||||
"D:\work\smtp\Srvrdlg.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP33.tmp"
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP34.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib winmm.lib comctl32.lib /nologo /subsystem:windows /pdb:none /map:".\msvcobj/Smtp.map" /debug /machine:I386 /out:".\msvcobj/Smtp.exe"
|
||||
.\msvcobj\maildlg.obj
|
||||
.\msvcobj\mailinfo.obj
|
||||
.\msvcobj\mailreg.obj
|
||||
.\msvcobj\Main.obj
|
||||
.\msvcobj\response.obj
|
||||
.\msvcobj\smtp.obj
|
||||
.\msvcobj\smtpthrd.obj
|
||||
.\msvcobj\Srvrdlg.obj
|
||||
.\msvcobj\uuencode.obj
|
||||
.\mail.res
|
||||
\work\exe\mscommon.lib
|
||||
\work\exe\mssocket.lib
|
||||
\work\exe\statbar.lib
|
||||
\work\exe\msthread.lib
|
||||
\work\exe\msbsp.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP34.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
maildlg.cpp
|
||||
mailreg.cpp
|
||||
Main.cpp
|
||||
Srvrdlg.cpp
|
||||
Linking...
|
||||
Creating library .\msvcobj/Smtp.lib and object .\msvcobj/Smtp.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
Smtp.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
BIN
smtp/SMTP.~IC
Normal file
BIN
smtp/SMTP.~IC
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
82
smtp/SMTPTHRD.CPP
Normal file
82
smtp/SMTPTHRD.CPP
Normal file
@@ -0,0 +1,82 @@
|
||||
#include <smtp/smtpthrd.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable:4355)
|
||||
#endif
|
||||
SMTPThread::SMTPThread(void)
|
||||
: mStartTime(0), mDeltaTime(0)
|
||||
{
|
||||
mThreadHandler.setCallback(this,&SMTPThread::threadHandler);
|
||||
mHookHandler.setCallback(this,&SMTPThread::hookHandler);
|
||||
mEventHandlers.size((MsgPostOpen-MsgPreOpen)+1);
|
||||
MessageThread::insertHandler(&mThreadHandler);
|
||||
mBlockHooker.setHandler(&mHookHandler);
|
||||
}
|
||||
|
||||
SMTPThread::SMTPThread(const SMTPThread &someSMTPThread)
|
||||
{ // private implementation
|
||||
mThreadHandler.setCallback(this,&SMTPThread::threadHandler);
|
||||
MessageThread::insertHandler(&mThreadHandler);
|
||||
}
|
||||
|
||||
SMTPThread::~SMTPThread()
|
||||
{
|
||||
stop();
|
||||
MessageThread::removeHandler(&mThreadHandler);
|
||||
}
|
||||
|
||||
CallbackData::ReturnType SMTPThread::hookHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
mDeltaTime=(::GetTickCount()-mStartTime);
|
||||
if(mDeltaTime>TimeOut){::OutputDebugString("SMTPThread::hookHandler TIMEOUT\n");return TRUE;}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
DWORD SMTPThread::threadHandler(ThreadMessage &someThreadMessage)
|
||||
{
|
||||
switch(someThreadMessage.message())
|
||||
{
|
||||
case ThreadMessage::TM_CREATE :
|
||||
break;
|
||||
case ThreadMessage::TM_DESTROY :
|
||||
break;
|
||||
case ThreadMessage::TM_USER :
|
||||
if(MsgOpen==someThreadMessage.userDataOne())handleOpen((String*)someThreadMessage.userDataTwo());
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void SMTPThread::handleOpen(String *pServerName)
|
||||
{
|
||||
ThreadMessage openMessage;
|
||||
String serverName(*pServerName);
|
||||
int currentPriority;
|
||||
BOOL openResult;
|
||||
|
||||
delete pServerName;
|
||||
currentPriority=::GetThreadPriority(::GetCurrentThread());
|
||||
::SetThreadPriority(::GetCurrentThread(),THREAD_PRIORITY_ABOVE_NORMAL);
|
||||
if(callHandler(openMessage,MsgPreOpen))
|
||||
{
|
||||
::SetThreadPriority(::GetCurrentThread(),currentPriority);
|
||||
return;
|
||||
}
|
||||
mStartTime=::GetTickCount();
|
||||
mBlockHooker.hookBlock();
|
||||
SMTPClient::open(serverName);
|
||||
mBlockHooker.unhookBlock();
|
||||
openMessage.userDataOne(isConnected());
|
||||
::SetThreadPriority(::GetCurrentThread(),currentPriority);
|
||||
callHandler(openMessage,MsgOpen);
|
||||
callHandler(openMessage,MsgPostOpen);
|
||||
SMTPClient::close();
|
||||
}
|
||||
|
||||
BOOL SMTPThread::open(const String &serverName)
|
||||
{
|
||||
String *pString=new String(serverName);
|
||||
ThreadMessage openMessage(ThreadMessage::TM_USER,MsgOpen,(LONG)pString);
|
||||
return postMessage(openMessage);
|
||||
}
|
||||
|
||||
62
smtp/SMTPTHRD.HPP
Normal file
62
smtp/SMTPTHRD.HPP
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef _SMTP_SMTPTHREAD_HPP_
|
||||
#define _SMTP_SMTPTHREAD_HPP_
|
||||
#ifndef _THREAD_MESSAGETHREAD_HPP_
|
||||
#include <thread/mthread.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_SMTPCLIENT_HPP_
|
||||
#include <smtp/smtp.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_BLOCKHOOKER_HPP_
|
||||
#include <socket/hooker.hpp>
|
||||
#endif
|
||||
|
||||
class SMTPThread : private MessageThread, public SMTPClient
|
||||
{
|
||||
public:
|
||||
enum HandlerType{MsgPreOpen,MsgOpen,MsgPostOpen};
|
||||
SMTPThread(void);
|
||||
SMTPThread(const SMTPThread &someSMTPThread);
|
||||
virtual ~SMTPThread();
|
||||
BOOL open(const String &serverName);
|
||||
void insertHandler(ThreadCallbackPointer pThreadCallback,HandlerType typeHandler);
|
||||
void removeHandler(HandlerType typeHandler);
|
||||
void stop(void);
|
||||
private:
|
||||
enum {TimeOut=10000};
|
||||
void handleOpen(String *pServerName);
|
||||
DWORD callHandler(ThreadMessage &someThreadMessage,HandlerType typeHandler);
|
||||
DWORD threadHandler(ThreadMessage &someThreadMessage);
|
||||
CallbackData::ReturnType hookHandler(CallbackData &someCallbackData);
|
||||
|
||||
ThreadCallback<SMTPThread> mThreadHandler;
|
||||
Array<ThreadCallbackPointer> mEventHandlers;
|
||||
Callback<SMTPThread> mHookHandler;
|
||||
BlockHooker mBlockHooker;
|
||||
DWORD mStartTime;
|
||||
DWORD mDeltaTime;
|
||||
};
|
||||
|
||||
inline
|
||||
void SMTPThread::insertHandler(ThreadCallbackPointer pThreadCallback,HandlerType typeHandler)
|
||||
{
|
||||
mEventHandlers[typeHandler]=ThreadCallbackPointer(pThreadCallback);
|
||||
}
|
||||
|
||||
inline
|
||||
void SMTPThread::removeHandler(HandlerType typeHandler)
|
||||
{
|
||||
mEventHandlers[typeHandler]=ThreadCallbackPointer();
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD SMTPThread::callHandler(ThreadMessage &someThreadMessage,HandlerType typeHandler)
|
||||
{
|
||||
return mEventHandlers[typeHandler].callback(someThreadMessage);
|
||||
}
|
||||
|
||||
inline
|
||||
void SMTPThread::stop(void)
|
||||
{
|
||||
MessageThread::stop();
|
||||
}
|
||||
#endif
|
||||
37
smtp/SRVRDLG.CPP
Normal file
37
smtp/SRVRDLG.CPP
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <smtp/srvrdlg.hpp>
|
||||
|
||||
WORD ServerDialog::performDialog(String &serverName)
|
||||
{
|
||||
::DialogBoxParam(processInstance(),(LPSTR)"ServerDialog",mhParent,(DLGPROC)DWindow::DlgProc,(LONG)((DWindow*)this));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType ServerDialog::initDialogHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
if(!mMailReg.server().isNull())setText(ServerName,mMailReg.server());
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
void ServerDialog::getServerName(void)
|
||||
{
|
||||
String serverName;
|
||||
|
||||
getText(ServerName,serverName);
|
||||
if(serverName.isNull())return;
|
||||
mMailReg.server(serverName);
|
||||
}
|
||||
|
||||
CallbackData::ReturnType ServerDialog::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wmCommandID())
|
||||
{
|
||||
case IDOK :
|
||||
getServerName();
|
||||
endDialog(TRUE);
|
||||
break;
|
||||
case IDCANCEL :
|
||||
endDialog(TRUE);
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
68
smtp/SRVRDLG.HPP
Normal file
68
smtp/SRVRDLG.HPP
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef _SMTP_SERVERDLG_HPP_
|
||||
#define _SMTP_SERVERDLG_HPP_
|
||||
#ifndef _COMMON_DWINDOW_HPP_
|
||||
#include <common/dwindow.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_WINDOW_HPP_
|
||||
#include <common/window.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_MAIL_HPP_
|
||||
#include <smtp/mail.hpp>
|
||||
#endif
|
||||
#ifndef _SMTP_MAILREG_HPP_
|
||||
#include <smtp/mailreg.hpp>
|
||||
#endif
|
||||
|
||||
class String;
|
||||
|
||||
class ServerDialog : private DWindow
|
||||
{
|
||||
public:
|
||||
ServerDialog(const GUIWindow &parentWindow);
|
||||
virtual ~ServerDialog();
|
||||
WORD performDialog(String &serverName);
|
||||
private:
|
||||
enum{ServerName=MS_SERVERNAME};
|
||||
ServerDialog(const ServerDialog &someServerDialog);
|
||||
ServerDialog &operator=(const ServerDialog &someServerDialog);
|
||||
CallbackData::ReturnType initDialogHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
void getServerName(void);
|
||||
|
||||
Callback<ServerDialog> mInitDialogHandler;
|
||||
Callback<ServerDialog> mCommandHandler;
|
||||
MailReg mMailReg;
|
||||
HWND mhParent;
|
||||
};
|
||||
|
||||
inline
|
||||
ServerDialog::ServerDialog(const GUIWindow &parentWindow)
|
||||
: mhParent(parentWindow)
|
||||
{
|
||||
mInitDialogHandler.setCallback(this,&ServerDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&ServerDialog::commandHandler);
|
||||
insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
insertHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
ServerDialog::ServerDialog(const ServerDialog &someServerDialog)
|
||||
: mhParent(someServerDialog.mhParent)
|
||||
{ // no implementation
|
||||
mInitDialogHandler.setCallback(this,&ServerDialog::initDialogHandler);
|
||||
mCommandHandler.setCallback(this,&ServerDialog::commandHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
ServerDialog::~ServerDialog()
|
||||
{
|
||||
removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
removeHandler(VectorHandler::InitDialogHandler,&mInitDialogHandler);
|
||||
}
|
||||
|
||||
inline
|
||||
ServerDialog &ServerDialog::operator=(const ServerDialog &/*someServerDialog*/)
|
||||
{ // no implementation
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
207
smtp/Smtp.001
Normal file
207
smtp/Smtp.001
Normal file
@@ -0,0 +1,207 @@
|
||||
# Microsoft Developer Studio Project File - Name="smtp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=smtp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtp.mak" CFG="smtp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtp - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "smtp - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "smtp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp"\work\exe\msvc42.pch" /YX"windows.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /fo".\mail.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib winmm.lib comctl32.lib /nologo /subsystem:windows /pdb:none /map /debug /machine:I386
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "smtp - Win32 Release"
|
||||
# Name "smtp - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.rc
|
||||
|
||||
!IF "$(CFG)" == "smtp - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtp - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\maildlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailinfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailreg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\exe\mscommon.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\exe\mssocket.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\exe\msthread.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\response.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smtp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smtpthrd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Srvrdlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\exe\statbar.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\uuencode.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Maildlg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailreg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Ptrex.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Srvrdlg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
185
smtp/Smtp.dsp
Normal file
185
smtp/Smtp.dsp
Normal file
@@ -0,0 +1,185 @@
|
||||
# Microsoft Developer Studio Project File - Name="smtp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=smtp - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtp.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtp.mak" CFG="smtp - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtp - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "smtp - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "smtp - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtp - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp8 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp"\work\exe\msvc42.pch" /YX"windows.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /fo".\mail.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib winmm.lib comctl32.lib /nologo /subsystem:windows /pdb:none /map /debug /machine:I386
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "smtp - Win32 Release"
|
||||
# Name "smtp - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\maildlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailinfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailreg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\response.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smtp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\smtpthrd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Srvrdlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\uuencode.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mail.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Maildlg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailreg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Ptrex.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Srvrdlg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
1046
smtp/Smtp.mak
Normal file
1046
smtp/Smtp.mak
Normal file
File diff suppressed because it is too large
Load Diff
134
smtp/Smtplib.001
Normal file
134
smtp/Smtplib.001
Normal file
@@ -0,0 +1,134 @@
|
||||
# Microsoft Developer Studio Project File - Name="smtplib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=smtplib - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtplib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtplib.mak" CFG="smtplib - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtplib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "smtplib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /YX /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\exe\smtplib.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "smtplib - Win32 Release"
|
||||
# Name "smtplib - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Ptrex.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
477
smtp/Smtplib.bak
Normal file
477
smtp/Smtplib.bak
Normal file
@@ -0,0 +1,477 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=smtplib - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to smtplib - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "smtplib - Win32 Release" && "$(CFG)" !=\
|
||||
"smtplib - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "smtplib.mak" CFG="smtplib - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtplib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "smtplib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "smtplib - Win32 Debug"
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "$(OUTDIR)\smtplib.lib"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Mailinfo.obj"
|
||||
-@erase "$(INTDIR)\Response.obj"
|
||||
-@erase "$(INTDIR)\Smtp.obj"
|
||||
-@erase "$(INTDIR)\Smtpthrd.obj"
|
||||
-@erase "$(INTDIR)\Uuencode.obj"
|
||||
-@erase "$(OUTDIR)\smtplib.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
|
||||
/Fp"$(INTDIR)/smtplib.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=.\.
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/smtplib.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)/smtplib.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\Mailinfo.obj" \
|
||||
"$(INTDIR)\Response.obj" \
|
||||
"$(INTDIR)\Smtp.obj" \
|
||||
"$(INTDIR)\Smtpthrd.obj" \
|
||||
"$(INTDIR)\Uuencode.obj"
|
||||
|
||||
"$(OUTDIR)\smtplib.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\msvcobj
|
||||
INTDIR=.\msvcobj
|
||||
|
||||
ALL : "..\exe\smtplib.lib"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Mailinfo.obj"
|
||||
-@erase "$(INTDIR)\Response.obj"
|
||||
-@erase "$(INTDIR)\Smtp.obj"
|
||||
-@erase "$(INTDIR)\Smtpthrd.obj"
|
||||
-@erase "$(INTDIR)\Uuencode.obj"
|
||||
-@erase "..\exe\smtplib.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /YX /c
|
||||
CPP_PROJ=/nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
|
||||
"__FLAT__" /D "STRICT" /Fp"$(INTDIR)/smtplib.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\msvcobj/
|
||||
CPP_SBRS=.\.
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/smtplib.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\exe\smtplib.lib"
|
||||
LIB32_FLAGS=/nologo /out:"..\exe\smtplib.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\Mailinfo.obj" \
|
||||
"$(INTDIR)\Response.obj" \
|
||||
"$(INTDIR)\Smtp.obj" \
|
||||
"$(INTDIR)\Smtpthrd.obj" \
|
||||
"$(INTDIR)\Uuencode.obj"
|
||||
|
||||
"..\exe\smtplib.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Target
|
||||
|
||||
# Name "smtplib - Win32 Release"
|
||||
# Name "smtplib - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.cpp
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
DEP_CPP_UUENC=\
|
||||
{$(INCLUDE)}"\.\Uuencode.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\Common\Commctrl.hpp"\
|
||||
{$(INCLUDE)}"\Common\Diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Finddata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Font.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Openfile.hpp"\
|
||||
{$(INCLUDE)}"\Common\overlap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Profile.hpp"\
|
||||
{$(INCLUDE)}"\Common\Progress.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purebmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purehdc.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pureicon.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Window.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Uuencode.obj" : $(SOURCE) $(DEP_CPP_UUENC) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
DEP_CPP_UUENC=\
|
||||
{$(INCLUDE)}"\.\Uuencode.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\Common\Commctrl.hpp"\
|
||||
{$(INCLUDE)}"\Common\Diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Finddata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Font.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Openfile.hpp"\
|
||||
{$(INCLUDE)}"\Common\overlap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Profile.hpp"\
|
||||
{$(INCLUDE)}"\Common\Progress.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purebmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purehdc.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pureicon.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Vhandler.hpp"\
|
||||
{$(INCLUDE)}"\Common\Window.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Uuencode.obj" : $(SOURCE) $(DEP_CPP_UUENC) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.cpp
|
||||
DEP_CPP_RESPO=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Response.obj" : $(SOURCE) $(DEP_CPP_RESPO) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.cpp
|
||||
DEP_CPP_SMTP_=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtp.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Console.hpp"\
|
||||
{$(INCLUDE)}"\Common\Coord.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Scrnbuff.hpp"\
|
||||
{$(INCLUDE)}"\Common\Smrect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winsock.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Cache.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Hostent.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Inaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Intsaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Servent.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Socket.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Timeinfo.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Wsadata.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Smtp.obj" : $(SOURCE) $(DEP_CPP_SMTP_) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.cpp
|
||||
DEP_CPP_SMTPT=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtp.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtpthrd.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\codegen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Console.hpp"\
|
||||
{$(INCLUDE)}"\Common\Coord.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Scrnbuff.hpp"\
|
||||
{$(INCLUDE)}"\Common\Smrect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdio.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winnt.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winsock.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Cache.hpp"\
|
||||
{$(INCLUDE)}"\socket\hooker.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Inaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Intsaddr.hpp"\
|
||||
{$(INCLUDE)}"\socket\procaddr.hpp"\
|
||||
{$(INCLUDE)}"\socket\procaddr.tpp"\
|
||||
{$(INCLUDE)}"\Socket\Socket.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Timeinfo.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Wsadata.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Context.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Event.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Msgqueue.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Mthread.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Mutex.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Ptcllbck.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Qthread.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Savearea.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Tcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Tcallbck.tpp"\
|
||||
{$(INCLUDE)}"\Thread\Thmsg.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Thread.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Smtpthrd.obj" : $(SOURCE) $(DEP_CPP_SMTPT) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.cpp
|
||||
DEP_CPP_MAILI=\
|
||||
{$(INCLUDE)}"\.\mailinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Mailinfo.obj" : $(SOURCE) $(DEP_CPP_MAILI) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
140
smtp/Smtplib.dsp
Normal file
140
smtp/Smtplib.dsp
Normal file
@@ -0,0 +1,140 @@
|
||||
# Microsoft Developer Studio Project File - Name="smtplib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=smtplib - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtplib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Smtplib.mak" CFG="smtplib - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtplib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "smtplib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Gz /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\exe\smtplib.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "smtplib - Win32 Release"
|
||||
# Name "smtplib - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mailinfo.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Ptrex.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
smtp/Smtplib.dsw
Normal file
29
smtp/Smtplib.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "smtplib"=.\Smtplib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
477
smtp/Smtplib.mak
Normal file
477
smtp/Smtplib.mak
Normal file
@@ -0,0 +1,477 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=smtplib - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to smtplib - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "smtplib - Win32 Release" && "$(CFG)" !=\
|
||||
"smtplib - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "smtplib.mak" CFG="smtplib - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "smtplib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "smtplib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "smtplib - Win32 Debug"
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "$(OUTDIR)\smtplib.lib"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Mailinfo.obj"
|
||||
-@erase "$(INTDIR)\Response.obj"
|
||||
-@erase "$(INTDIR)\Smtp.obj"
|
||||
-@erase "$(INTDIR)\Smtpthrd.obj"
|
||||
-@erase "$(INTDIR)\Uuencode.obj"
|
||||
-@erase "$(OUTDIR)\smtplib.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
|
||||
/Fp"$(INTDIR)/smtplib.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=.\.
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/smtplib.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
LIB32_FLAGS=/nologo /out:"$(OUTDIR)/smtplib.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\Mailinfo.obj" \
|
||||
"$(INTDIR)\Response.obj" \
|
||||
"$(INTDIR)\Smtp.obj" \
|
||||
"$(INTDIR)\Smtpthrd.obj" \
|
||||
"$(INTDIR)\Uuencode.obj"
|
||||
|
||||
"$(OUTDIR)\smtplib.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\msvcobj
|
||||
INTDIR=.\msvcobj
|
||||
|
||||
ALL : "..\exe\smtplib.lib"
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\Mailinfo.obj"
|
||||
-@erase "$(INTDIR)\Response.obj"
|
||||
-@erase "$(INTDIR)\Smtp.obj"
|
||||
-@erase "$(INTDIR)\Smtpthrd.obj"
|
||||
-@erase "$(INTDIR)\Uuencode.obj"
|
||||
-@erase "..\exe\smtplib.lib"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /YX /c
|
||||
CPP_PROJ=/nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
|
||||
"__FLAT__" /D "STRICT" /Fp"$(INTDIR)/smtplib.pch" /YX /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\msvcobj/
|
||||
CPP_SBRS=.\.
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/smtplib.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\exe\smtplib.lib"
|
||||
LIB32_FLAGS=/nologo /out:"..\exe\smtplib.lib"
|
||||
LIB32_OBJS= \
|
||||
"$(INTDIR)\Mailinfo.obj" \
|
||||
"$(INTDIR)\Response.obj" \
|
||||
"$(INTDIR)\Smtp.obj" \
|
||||
"$(INTDIR)\Smtpthrd.obj" \
|
||||
"$(INTDIR)\Uuencode.obj"
|
||||
|
||||
"..\exe\smtplib.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
|
||||
$(LIB32) @<<
|
||||
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Target
|
||||
|
||||
# Name "smtplib - Win32 Release"
|
||||
# Name "smtplib - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Uuencode.cpp
|
||||
|
||||
!IF "$(CFG)" == "smtplib - Win32 Release"
|
||||
|
||||
DEP_CPP_UUENC=\
|
||||
{$(INCLUDE)}"\.\Uuencode.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\Common\Commctrl.hpp"\
|
||||
{$(INCLUDE)}"\Common\Diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Finddata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Font.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Openfile.hpp"\
|
||||
{$(INCLUDE)}"\Common\overlap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Profile.hpp"\
|
||||
{$(INCLUDE)}"\Common\Progress.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purebmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purehdc.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pureicon.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Window.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Uuencode.obj" : $(SOURCE) $(DEP_CPP_UUENC) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "smtplib - Win32 Debug"
|
||||
|
||||
DEP_CPP_UUENC=\
|
||||
{$(INCLUDE)}"\.\Uuencode.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\Common\Commctrl.hpp"\
|
||||
{$(INCLUDE)}"\Common\Diskinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Finddata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Font.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdiobj.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Guiwnd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconbmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconfrm.hpp"\
|
||||
{$(INCLUDE)}"\Common\Iconinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmsystem.hpp"\
|
||||
{$(INCLUDE)}"\Common\Mmtimer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Openfile.hpp"\
|
||||
{$(INCLUDE)}"\Common\overlap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Profile.hpp"\
|
||||
{$(INCLUDE)}"\Common\Progress.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purebmp.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Purehdc.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pureicon.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Vhandler.hpp"\
|
||||
{$(INCLUDE)}"\Common\Window.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Uuencode.obj" : $(SOURCE) $(DEP_CPP_UUENC) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Response.cpp
|
||||
DEP_CPP_RESPO=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Response.obj" : $(SOURCE) $(DEP_CPP_RESPO) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtp.cpp
|
||||
DEP_CPP_SMTP_=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtp.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Console.hpp"\
|
||||
{$(INCLUDE)}"\Common\Coord.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Scrnbuff.hpp"\
|
||||
{$(INCLUDE)}"\Common\Smrect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winsock.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Cache.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Hostent.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Inaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Intsaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Servent.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Socket.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Timeinfo.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Wsadata.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Smtp.obj" : $(SOURCE) $(DEP_CPP_SMTP_) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Smtpthrd.cpp
|
||||
DEP_CPP_SMTPT=\
|
||||
{$(INCLUDE)}"\.\Ptrex.hpp"\
|
||||
{$(INCLUDE)}"\.\Response.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtp.hpp"\
|
||||
{$(INCLUDE)}"\.\Smtpthrd.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Btree.tpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.hpp"\
|
||||
{$(INCLUDE)}"\Bsptree\Treenode.tpp"\
|
||||
{$(INCLUDE)}"\Common\array.hpp"\
|
||||
{$(INCLUDE)}"\Common\Assert.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.hpp"\
|
||||
{$(INCLUDE)}"\Common\Callback.tpp"\
|
||||
{$(INCLUDE)}"\Common\Cbdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Cbptr.hpp"\
|
||||
{$(INCLUDE)}"\common\codegen.hpp"\
|
||||
{$(INCLUDE)}"\Common\Console.hpp"\
|
||||
{$(INCLUDE)}"\Common\Coord.hpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filemap.hpp"\
|
||||
{$(INCLUDE)}"\Common\Filetime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Fixup.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.hpp"\
|
||||
{$(INCLUDE)}"\Common\Gdata.tpp"\
|
||||
{$(INCLUDE)}"\Common\Gdipoint.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Common\Point.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pointer.hpp"\
|
||||
{$(INCLUDE)}"\Common\Puredwrd.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.hpp"\
|
||||
{$(INCLUDE)}"\Common\Pvector.tpp"\
|
||||
{$(INCLUDE)}"\Common\Pview.hpp"\
|
||||
{$(INCLUDE)}"\Common\Rect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Scrnbuff.hpp"\
|
||||
{$(INCLUDE)}"\Common\Smrect.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdio.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Systime.hpp"\
|
||||
{$(INCLUDE)}"\Common\Types.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windowsx.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winnt.hpp"\
|
||||
{$(INCLUDE)}"\Common\Winsock.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Cache.hpp"\
|
||||
{$(INCLUDE)}"\socket\hooker.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Inaddr.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Intsaddr.hpp"\
|
||||
{$(INCLUDE)}"\socket\procaddr.hpp"\
|
||||
{$(INCLUDE)}"\socket\procaddr.tpp"\
|
||||
{$(INCLUDE)}"\Socket\Socket.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Timeinfo.hpp"\
|
||||
{$(INCLUDE)}"\Socket\Wsadata.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Context.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Event.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Msgqueue.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Mthread.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Mutex.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Ptcllbck.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Qthread.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Savearea.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Tcallbck.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Tcallbck.tpp"\
|
||||
{$(INCLUDE)}"\Thread\Thmsg.hpp"\
|
||||
{$(INCLUDE)}"\Thread\Thread.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Smtpthrd.obj" : $(SOURCE) $(DEP_CPP_SMTPT) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Mailinfo.cpp
|
||||
DEP_CPP_MAILI=\
|
||||
{$(INCLUDE)}"\.\mailinfo.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.hpp"\
|
||||
{$(INCLUDE)}"\Common\Block.tpp"\
|
||||
{$(INCLUDE)}"\Common\except.hpp"\
|
||||
{$(INCLUDE)}"\Common\Stdlib.hpp"\
|
||||
{$(INCLUDE)}"\Common\String.hpp"\
|
||||
{$(INCLUDE)}"\Common\Windows.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Mailinfo.obj" : $(SOURCE) $(DEP_CPP_MAILI) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
BIN
smtp/Smtplib.mdp
Normal file
BIN
smtp/Smtplib.mdp
Normal file
Binary file not shown.
BIN
smtp/Smtplib.opt
Normal file
BIN
smtp/Smtplib.opt
Normal file
Binary file not shown.
35
smtp/Smtplib.plg
Normal file
35
smtp/Smtplib.plg
Normal file
@@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: smtplib - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP56.tmp" with contents
|
||||
[
|
||||
/nologo /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /Fp".\msvcobj/Smtplib.pch" /YX /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /c
|
||||
"D:\work\smtp\Mailinfo.cpp"
|
||||
"D:\work\smtp\Response.cpp"
|
||||
"D:\work\smtp\Smtp.cpp"
|
||||
"D:\work\smtp\Smtpthrd.cpp"
|
||||
"D:\work\smtp\Uuencode.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP56.tmp"
|
||||
Creating command line "link.exe -lib /nologo /out:"..\exe\smtplib.lib" .\msvcobj\Mailinfo.obj .\msvcobj\Response.obj .\msvcobj\Smtp.obj .\msvcobj\Smtpthrd.obj .\msvcobj\Uuencode.obj "
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Mailinfo.cpp
|
||||
Response.cpp
|
||||
Smtp.cpp
|
||||
Smtpthrd.cpp
|
||||
Uuencode.cpp
|
||||
Creating library...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
smtplib.lib - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
60
smtp/UUENCODE.CPP
Normal file
60
smtp/UUENCODE.CPP
Normal file
@@ -0,0 +1,60 @@
|
||||
#include <smtp/uuencode.hpp>
|
||||
#include <common/openfile.hpp>
|
||||
#include <common/pview.hpp>
|
||||
#include <common/filemap.hpp>
|
||||
#include <common/progress.hpp>
|
||||
#include <common/profile.hpp>
|
||||
|
||||
BOOL UUEncode::encode(GUIWindow &parentWindow,String srcPathFileName,Block<String> &lineStrings,BOOL initBlock)const
|
||||
{
|
||||
Profile iniProfile;
|
||||
char readBuff[45];
|
||||
int readCount;
|
||||
int byteCount;
|
||||
int lineCount;
|
||||
char *ptrBuff;
|
||||
String outLine;
|
||||
int ch;
|
||||
|
||||
if(initBlock)lineStrings.remove();
|
||||
if(srcPathFileName.isNull())return FALSE;
|
||||
FileHandle readFile(srcPathFileName,FileHandle::Read,FileHandle::ShareRead);
|
||||
if(!readFile.isOkay())return FALSE;
|
||||
FileMap readMap(readFile);
|
||||
PureViewOfFile readView(readMap);
|
||||
iniProfile.makeFileName(srcPathFileName);
|
||||
srcPathFileName.removeTokens("\\/");
|
||||
::sprintf(outLine,"begin %d %s",644,(char*)srcPathFileName);
|
||||
lineStrings.insert(&outLine);
|
||||
Progress encodeProgress(parentWindow,srcPathFileName);
|
||||
encodeProgress.canCancel(TRUE);
|
||||
encodeProgress.show(TRUE);
|
||||
encodeProgress.setText("encoding... (press ESC to cancel).");
|
||||
while(sizeof(readBuff)==readView.read(readBuff,sizeof(readBuff))){parentWindow.yieldTask();lineCount++;}
|
||||
readView.rewind();
|
||||
encodeProgress.range(lineCount);
|
||||
while(readCount=readView.read(readBuff,sizeof(readBuff)))
|
||||
{
|
||||
String lineString;
|
||||
char *ptrLine=(LPSTR)lineString;
|
||||
*(ptrLine++)=chEncode(readCount);
|
||||
for(ptrBuff=readBuff,byteCount=readCount;byteCount>0;byteCount-=3,ptrBuff+=3)
|
||||
{
|
||||
*(ptrLine++)=chEncode(*ptrBuff>>2);
|
||||
*(ptrLine++)=chEncode((*ptrBuff<<4)&0x30|(ptrBuff[1]>>4)&0x0F);
|
||||
*(ptrLine++)=chEncode((ptrBuff[1]<<2)&0x3C|(ptrBuff[2]>>6)&0x03);
|
||||
*(ptrLine++)=chEncode(ptrBuff[2]&0x3F);
|
||||
parentWindow.yieldTask();
|
||||
}
|
||||
lineStrings.insert(&lineString);
|
||||
encodeProgress++;
|
||||
if(!encodeProgress.isOkay()){lineStrings.remove();return FALSE;}
|
||||
if(readCount!=sizeof(readBuff))break;
|
||||
}
|
||||
String lastLine;
|
||||
lastLine+=(char)('\0'?('\0'&0x3F)+' ':'`');
|
||||
lineStrings.insert(&lastLine);
|
||||
lineStrings.insert(&String("end"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
37
smtp/UUENCODE.HPP
Normal file
37
smtp/UUENCODE.HPP
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef _SMTP_UUENCODE_HPP_
|
||||
#define _SMTP_UUENCODE_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
class Block;
|
||||
class String;
|
||||
class GUIWindow;
|
||||
|
||||
class UUEncode
|
||||
{
|
||||
public:
|
||||
UUEncode(void);
|
||||
virtual ~UUEncode();
|
||||
BOOL encode(GUIWindow &parentWindow,String srcPathFileName,Block<String> &lineStrings,BOOL initBlock=TRUE)const;
|
||||
private:
|
||||
BYTE chEncode(int ch)const;
|
||||
};
|
||||
|
||||
inline
|
||||
UUEncode::UUEncode(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
UUEncode::~UUEncode()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE UUEncode::chEncode(int ch)const
|
||||
{
|
||||
return (ch?(ch&0x3F)+' ':'`');
|
||||
}
|
||||
#endif
|
||||
BIN
smtp/mail.res
Normal file
BIN
smtp/mail.res
Normal file
Binary file not shown.
104
smtp/smtp.dsw
Normal file
104
smtp/smtp.dsw
Normal file
@@ -0,0 +1,104 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "bsptree"=..\BSPTREE\bsptree.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\COMMON\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "smtp"=.\Smtp.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name socket
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name statbar
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name thread
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name bsptree
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "socket"=..\SOCKET\socket.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "statbar"=..\STATBAR\Statbar.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "thread"=..\THREAD\thread.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
smtp/smtp.mdp
Normal file
BIN
smtp/smtp.mdp
Normal file
Binary file not shown.
BIN
smtp/smtp.opt
Normal file
BIN
smtp/smtp.opt
Normal file
Binary file not shown.
Reference in New Issue
Block a user