28 #ifndef PTLIB_INETMAIL_H
29 #define PTLIB_INETMAIL_H
191 bool eightBitMIME =
false
212 bool InternalHello();
213 bool InternalExtendedHello();
214 PString InternalLocalHostName();
215 bool InternalBeginMessage(
bool useEightBitMIME);
721 PINDEX messageNumber,
734 PINDEX messageNumber,
1034 #endif // PTLIB_INETMAIL_H
bool writePartHeaders
Definition: inetmail.h:1027
void NewMessage(Direction direction)
Begin a new message.
static const PCaselessString & SubjectTag()
PBoolean eightBitMIME
Definition: inetmail.h:436
Definition: inetmail.h:843
virtual PBoolean HandleMessage(PCharArray &buffer, PBoolean starting, PBoolean completed)
Handle a received message.
static const PCaselessString & ContentTypeTag()
Definition: inetmail.h:493
This class contains the Multipurpose Internet Mail Extensions parameters and variables.
Definition: mime.h:48
bool writeHeaders
Definition: inetmail.h:1025
PString m_subject
Subject of message.
Definition: inetmail.h:99
static const PCaselessString & ContentTransferEncodingTag()
Definition: inetmail.h:1019
Definition: inetmail.h:844
virtual void OnHELO(const PCaselessString &remoteHost)
Allow the use of the plain old USER/PASS if APOP or SASL are not available.
Definition: inetmail.h:581
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:675
virtual void OnEHLO(const PCaselessString &remoteHost)
PUnsignedArray messageSizes
Definition: inetmail.h:807
virtual void OnPASS(const PString &passwd)
Array of characters.
Definition: array.h:552
void SetFromAddress(const PString &fromAddress)
Set the sender address.
Definition: inetmail.h:442
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
static const PString & okResponse()
PSMTPServer()
Create a TCP/IP SMPTP protocol socket channel.
virtual PBoolean OnTextData(PCharArray &buffer, PBoolean &completed)
Read a standard text message that is being received by the socket.
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
User name was valid but ambiguous.
Definition: inetmail.h:291
PStringList m_bcc
Blind carbon copy list.
Definition: inetmail.h:98
Direction
Definition: inetmail.h:842
virtual void OnMAIL(const PCaselessString &sender)
Definition: inetmail.h:79
static const PCaselessString & MessageIDTag()
PString MultipartMessage()
Enter multipart MIME message mode.
Definition: inetmail.h:79
Definition: inetmail.h:494
void SetContentType(const PString &contentType)
Set the content type.
PString m_password
Password if credentials required.
Definition: inetmail.h:94
void SetHeaderField(const PString &name, const PString &value)
Set the and arbitrary header field.
A channel for sending/receiving RFC822 compliant mail messages.
Definition: inetmail.h:838
Definition: inetmail.h:493
virtual void HandleSendMessage(PINDEX messageNumber, const PString &id, PINDEX lines)
Handle the sending of the specified message to the remote client.
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
User name was invalid.
Definition: inetmail.h:292
void SetCC(const PString &ccAddress)
Set the Carbon Copy address(es).
ForwardResult
Definition: inetmail.h:271
Parameters()
Definition: inetmail.h:85
Definition: inetmail.h:494
PINDEX messageBufferSize
Definition: inetmail.h:441
void SetToAddress(const PString &toAddress)
Set the recipient address(es).
Definition: inetmail.h:494
virtual PBoolean OnUnknown(const PCaselessString &command)
Handle an unknown command.
Definition: inetmail.h:77
void SetSubject(const PString &subject)
Set the message subject.
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:3151
This class describes a full description for a file on the particular platform.
Definition: filepath.h:61
PStringArray messageIDs
Definition: inetmail.h:808
LoginOptions
Definition: inetmail.h:579
Definition: inetmail.h:77
Definition: inetmail.h:495
static const PCaselessString & ReceivedTag()
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:45
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
User may be on local machine, do LookUpName().
Definition: inetmail.h:272
PBoolean ProcessCommand()
Process commands, dispatching to the appropriate virtual function.
static const PCaselessString & ContentTypeTag()
Definition: inetmail.h:1017
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:69
virtual void OnLIST(PINDEX msg)
Get the size of a message in mailbox.
PBoolean loggedIn
Definition: inetmail.h:658
enum PSMTPServer::@21 sendCommand
static const PCaselessString & ToTag()
static const PCaselessString & CCTag()
Definition: inetmail.h:493
PUnsignedArray GetMessageSizes()
Get an array of a integers representing the sizes of each of the messages in the mail box...
This is an array collection class of PString objects.
Definition: pstring.h:2365
PBYTEArray messageDeletions
Definition: inetmail.h:809
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
Definition: inetmail.h:76
virtual void OnRCPT(const PCaselessString &recipient)
Definition: inetmail.h:76
PMIMEInfo headers
Definition: inetmail.h:1026
Definition: inetmail.h:79
Definition: inetmail.h:77
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:134
~PPOP3Client()
Destroy the channel object.
A TCP/IP socket for process/application layer high level protocols.
Definition: inetprot.h:61
LookUpResult
Definition: inetmail.h:289
PBoolean BeginMessage(PINDEX messageNumber)
bool LogIn(const PString &username, const PString &password)
Log into the SMTP server using the mailbox and access codes specified.
Definition: inetmail.h:494
static const PCaselessString & DateTag()
PStringList m_cc
Carbon copy list.
Definition: inetmail.h:97
~PSMTPClient()
Destroy the channel object.
PPOP3Client()
Create a TCP/IP POP3 protocol socket channel.
virtual void OnSOML(const PCaselessString &sender)
Definition: inetmail.h:493
Info sending email.
Definition: inetmail.h:83
Array of unsigned characters.
Definition: array.h:605
static const PCaselessString & MimeVersionTag()
PBoolean LogIn(const PString &username, const PString &password, int options=AllowUserPass)
Log into the POP server using the mailbox and access codes specified.
Definition: inetmail.h:493
Commands
Definition: inetmail.h:75
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:550
Definition: inetmail.h:76
virtual ForwardResult ForwardDomain(PCaselessString &userDomain, PCaselessString &forwardDomainList)
Determine if a user for this domain may be on the local system, or should be forwarded.
virtual PBoolean OnMIMEData(PCharArray &buffer, PBoolean &completed)
Read an eight bit MIME message that is being received by the socket.
virtual PBoolean OnUnknown(const PCaselessString &command)
Handle an unknown command.
static const PCaselessString & ContentDispositionTag()
Definition: inetmail.h:493
virtual void HandleDeleteMessage(PINDEX messageNumber, const PString &id)
Handle the deleting of the specified message from the mail box.
PStringList m_toNames
Definition: inetmail.h:208
User may be forwarded to another SMTP host.
Definition: inetmail.h:273
PSMTPClient()
Create a TCP/IP SMPTP protocol socket channel.
Definition: inetmail.h:77
~PRFC822Channel()
Close the channel before destruction.
virtual PBoolean Close()
Close the socket, and if connected as a client, QUITs from server.
static const PCaselessString & ContentTransferEncodingTag()
virtual void OnEXPN(const PCaselessString &name)
void SetContentAttachment(const PFilePath &filename)
Set the content disposition for attachments.
bool PBoolean
Definition: object.h:174
PStringArray GetMessageHeaders()
Get an array of a strings representing the standard internet message headers of each of the messages ...
virtual PINDEX ParseResponse(const PString &line)
Parse a response line string into a response code and any extra info on the line. ...
static const PCaselessString & FromTag()
bool BeginMessage(const PString &from, const PString &to, PBoolean eightBitMIME=false)
Begin transmission of a message using the SMTP socket as a client.
Definition: inetmail.h:76
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:487
virtual void OnDELE(PINDEX msg)
PPOP3Server()
Create a TCP/IP POP3 protocol socket channel.
PRFC822Channel(Direction direction)
Construct a RFC822 aware channel.
PBoolean Close()
Close the channel.
void NextPart(const PString &boundary)
Indicate that a new multipart message part is to begin.
The character string class.
Definition: pstring.h:108
Definition: inetmail.h:494
Definition: inetmail.h:78
static const PString & errResponse()
PString fromPath
Definition: inetmail.h:438
Use SASL if the AUTH command is supported by the server.
Definition: inetmail.h:583
PString m_fromAddress
Definition: inetmail.h:207
virtual void OnSEND(const PCaselessString &sender)
PStringList m_attachments
List of files to attach.
Definition: inetmail.h:101
bool m_haveHello
Definition: inetmail.h:205
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
Allow LOGIN and PLAIN mechanisms to be used.
Definition: inetmail.h:585
virtual PBoolean HandleOpenMailbox(const PString &username, const PString &password)
Log the specified user into the mail system and return sizes of each message in mail box...
This is a list collection class of PString objects.
Definition: pstring.h:2562
PString username
Definition: inetmail.h:806
User cannot be forwarded.
Definition: inetmail.h:274
static const PCaselessString & ReturnPathTag()
Definition: inetmail.h:442
static bool SendMail(const Parameters ¶ms, PString &error)
Make a TCP/TLS connection and send the simple mail message.
void SetTransferEncoding(const PString &encoding, PBoolean autoTranslate=true)
Set the content transfer encoding.
PBoolean extendedHello
Definition: inetmail.h:435
virtual LookUpResult LookUpName(const PCaselessString &name, PString &expandedName)
Look up a name in the context of the SMTP server.
PString m_username
Username of credentials required.
Definition: inetmail.h:93
PBoolean DeleteMessage(PINDEX messageNumber)
Delete the message specified from the mail box.
PStringList toNames
Definition: inetmail.h:439
Definition: inetmail.h:78
PString m_bodyText
Body for message, if text.
Definition: inetmail.h:100
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:244
Definition: inetmail.h:78
bool m_eightBitMIME
Eight bit MIME more.
Definition: inetmail.h:102
Some other error occurred in look up.
Definition: inetmail.h:293
Definition: inetmail.h:442
Definition: inetmail.h:78
StuffState endMIMEDetectState
Definition: inetmail.h:443
virtual void OnUIDL(PINDEX msg)
Get unique ID for message in mailbox.
virtual void OnSAML(const PCaselessString &sender)
virtual void OnSendMail(const PCaselessString &sender)
PStringToString m_extensions
Definition: inetmail.h:206
PString fromAddress
Definition: inetmail.h:437
PStringList toDomains
Definition: inetmail.h:440
static const PCaselessString & BCCTag()
Definition: inetmail.h:494
PString m_hostname
SMTP server host name.
Definition: inetmail.h:91
User name was valid and unique.
Definition: inetmail.h:290
StuffState
Definition: inetprot.h:392
void SetBCC(const PString &bccAddress)
Set the Blind Carbon Copy address(es).
static const PCaselessString & MailerTag()
PString m_from
Mail address of sender.
Definition: inetmail.h:95
PStringList m_to
Mail address of recipient.
Definition: inetmail.h:96
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
WORD m_port
SMTP port, zero is default for protocol.
Definition: inetmail.h:92
PMIMEInfo partHeaders
Definition: inetmail.h:1028
PBase64 * base64
Definition: inetmail.h:1030
A network communications channel.
Definition: socket.h:59
PBoolean ProcessCommand()
Process commands, dispatching to the appropriate virtual function.
PString apopBanner
Definition: inetmail.h:659
Definition: inetmail.h:77
bool m_sendingData
Definition: inetmail.h:209
Definition: inetmail.h:78
Definition: inetmail.h:76
virtual void OnRETR(PINDEX msg)
int GetMessageCount()
Get a count of the number of messages in the mail box.
virtual void OnUSER(const PString &name)
static const PCaselessString & ContentDispositionTag()
Definition: inetmail.h:1018
Commands
Definition: inetmail.h:492
Definition: inetmail.h:442
virtual void OnTOP(PINDEX msg, PINDEX count)
virtual void OnVRFY(const PCaselessString &name)
Definition: inetmail.h:495
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
PStringList boundaries
Definition: inetmail.h:1029
virtual PBoolean Close()
Close the socket, and if connected as a client, QUITs from server.
PBoolean EndMessage()
End transmission of a message using the SMTP socket as a client.