SMTP_DATA work.
This commit is contained in:
parent
bb1c2cf944
commit
30cd31c171
@ -70,7 +70,10 @@ namespace mail {
|
|||||||
return coreutils::MString(temp.str());
|
return coreutils::MString(temp.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
coreutils::MString __SMTP_DATA::queueMail(SMTPServer &server, coreutils::MString &sender, std::vector<coreutils::MString> &recipientList, std::stringstream &mailData) {
|
coreutils::MString __SMTP_DATA::queueMail(SMTPServer &server,
|
||||||
|
coreutils::MString &sender,
|
||||||
|
std::vector<coreutils::MString> &recipientList,
|
||||||
|
std::stringstream &mailData) {
|
||||||
coreutils::MString fileName;
|
coreutils::MString fileName;
|
||||||
fileName << server.mailFileSystem.getMailPath() << "/.queue/" << generateMailFileName();
|
fileName << server.mailFileSystem.getMailPath() << "/.queue/" << generateMailFileName();
|
||||||
coreutils::File mailFile(fileName, O_CREAT | O_WRONLY, 0660);
|
coreutils::File mailFile(fileName, O_CREAT | O_WRONLY, 0660);
|
||||||
|
6
main.cpp
6
main.cpp
@ -24,9 +24,9 @@ int main(int argc, char **argv) {
|
|||||||
mail::MailFileSystem mailFileSystem(mailPath);
|
mail::MailFileSystem mailFileSystem(mailPath);
|
||||||
|
|
||||||
core::EPoll ePoll;
|
core::EPoll ePoll;
|
||||||
mail::SMTPServer smtpServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 25));
|
mail::SMTPServer smtpServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 9025));
|
||||||
mail::POP3Server pop3Server(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 110));
|
// mail::POP3Server pop3Server(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 110));
|
||||||
mail::IMAPServer imapServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 143));
|
// mail::IMAPServer imapServer(ePoll, hostName, mailFileSystem, core::IPAddress(ipAddress, 143));
|
||||||
core::ConsoleServer consoleServer(ePoll, core::IPAddress(ipAddress, 1027));
|
core::ConsoleServer consoleServer(ePoll, core::IPAddress(ipAddress, 1027));
|
||||||
consoleServer.commands.add(consoleServer.commands, "help");
|
consoleServer.commands.add(consoleServer.commands, "help");
|
||||||
ePoll.start(2, 1000);
|
ePoll.start(2, 1000);
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
nc localhost 25 > /dev/null << EOL
|
nc localhost 9025 > /dev/null << EOL
|
||||||
EHLO barant.com
|
EHLO barant.com
|
||||||
MAIL FROM: <brad.arant@barant.com>
|
MAIL FROM: <brad.arant@barant.com>
|
||||||
RCPT TO: <barant@barant.com>
|
RCPT TO: <barant@barant.com>
|
||||||
|
DATA
|
||||||
|
From: barant@barant.com
|
||||||
|
To: barant@barant.com
|
||||||
|
Subject: test email system
|
||||||
|
|
||||||
|
This is a test
|
||||||
|
|
||||||
|
.
|
||||||
|
|
||||||
QUIT
|
QUIT
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user