32 #ifndef PTLIB_INETMAIL_H
33 #define PTLIB_INETMAIL_H
187 bool InternalBeginMessage();
693 PINDEX messageNumber,
706 PINDEX messageNumber,
1022 #endif // PTLIB_INETMAIL_H
void NewMessage(Direction direction)
Begin a new message.
PBoolean eightBitMIME
Definition: inetmail.h:181
static const PCaselessString & SubjectTag()
PBoolean eightBitMIME
Definition: inetmail.h:408
Definition: inetmail.h:815
virtual PBoolean HandleMessage(PCharArray &buffer, PBoolean starting, PBoolean completed)
Handle a received message.
static const PCaselessString & ContentTypeTag()
Definition: inetmail.h:465
This class contains the Multipurpose Internet Mail Extensions parameters and variables.
Definition: mime.h:52
static const PCaselessString & ContentTransferEncodingTag()
Definition: inetmail.h:991
Definition: inetmail.h:414
Definition: inetmail.h:816
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:553
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:647
virtual void OnEHLO(const PCaselessString &remoteHost)
PUnsignedArray messageSizes
Definition: inetmail.h:779
virtual void OnPASS(const PString &passwd)
Array of characters.
Definition: array.h:551
Definition: inetmail.h:414
void SetFromAddress(const PString &fromAddress)
Set the sender address.
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
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.
PBoolean writePartHeaders
Definition: inetmail.h:1015
User name was valid but ambiguous.
Definition: inetmail.h:263
Direction
Definition: inetmail.h:814
This class is used to encode/decode data using the MIME standard base64 encoding mechanism as defined...
Definition: cypher.h:70
virtual void OnMAIL(const PCaselessString &sender)
static const PCaselessString & MessageIDTag()
PString MultipartMessage()
Enter multipart MIME message mode.
Definition: inetmail.h:83
Definition: inetmail.h:466
void SetContentType(const PString &contentType)
Set the content type.
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:810
Definition: inetmail.h:465
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:264
void SetCC(const PString &ccAddress)
Set the Carbon Copy address(es).
ForwardResult
Definition: inetmail.h:243
Definition: inetmail.h:466
PINDEX messageBufferSize
Definition: inetmail.h:413
void SetToAddress(const PString &toAddress)
Set the recipient address(es).
Definition: inetmail.h:466
virtual PBoolean OnUnknown(const PCaselessString &command)
Handle an unknown command.
Definition: inetmail.h:81
void SetSubject(const PString &subject)
Set the message subject.
This class describes a full description for a file on the particular platform.
Definition: filepath.h:65
PStringArray messageIDs
Definition: inetmail.h:780
LoginOptions
Definition: inetmail.h:551
Definition: inetmail.h:81
Definition: inetmail.h:467
PBoolean sendingData
Definition: inetmail.h:184
static const PCaselessString & ReceivedTag()
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:49
PStringList toNames
Definition: inetmail.h:183
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
User may be on local machine, do LookUpName().
Definition: inetmail.h:244
PBoolean ProcessCommand()
Process commands, dispatching to the appropriate virtual function.
static const PCaselessString & ContentTypeTag()
Definition: inetmail.h:989
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:73
virtual void OnLIST(PINDEX msg)
Get the size of a message in mailbox.
PBoolean loggedIn
Definition: inetmail.h:630
static const PCaselessString & ToTag()
static const PCaselessString & CCTag()
Definition: inetmail.h:465
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:2024
PBYTEArray messageDeletions
Definition: inetmail.h:781
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
Definition: inetmail.h:80
virtual void OnRCPT(const PCaselessString &recipient)
Definition: inetmail.h:80
PMIMEInfo headers
Definition: inetmail.h:1014
Definition: inetmail.h:83
Definition: inetmail.h:81
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:108
~PPOP3Client()
Destroy the channel object.
A TCP/IP socket for process/application layer high level protocols.
Definition: inetprot.h:62
LookUpResult
Definition: inetmail.h:261
PBoolean BeginMessage(PINDEX messageNumber)
Definition: inetmail.h:466
static const PCaselessString & DateTag()
BOOL PBoolean
Definition: object.h:102
~PSMTPClient()
Destroy the channel object.
PPOP3Client()
Create a TCP/IP POP3 protocol socket channel.
virtual void OnSOML(const PCaselessString &sender)
Definition: inetmail.h:465
Array of unsigned characters.
Definition: array.h:670
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:465
Commands
Definition: inetmail.h:79
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:522
enum PSMTPServer::@23 sendCommand
Definition: inetmail.h:80
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:465
virtual void HandleDeleteMessage(PINDEX messageNumber, const PString &id)
Handle the deleting of the specified message from the mail box.
User may be forwarded to another SMTP host.
Definition: inetmail.h:245
PSMTPClient()
Create a TCP/IP SMPTP protocol socket channel.
Definition: inetmail.h:81
~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)
PString fromAddress
Definition: inetmail.h:182
PBoolean BeginMessage(const PString &from, const PString &to, PBoolean eightBitMIME=false)
Begin transmission of a message using the SMTP socket as a client.
void SetContentAttachment(const PFilePath &filename)
Set the content disposition for attachments.
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. ...
PBoolean haveHello
Definition: inetmail.h:179
static const PCaselessString & FromTag()
Definition: inetmail.h:414
Definition: inetmail.h:80
A TCP/IP socket for the Post Office Protocol version 3.
Definition: inetmail.h:459
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:414
Definition: inetmail.h:466
PBoolean writeHeaders
Definition: inetmail.h:1013
Array of unsigned integers.
Definition: array.h:737
Definition: inetmail.h:82
static const PString & errResponse()
PString fromPath
Definition: inetmail.h:410
Use SASL if the AUTH command is supported by the server.
Definition: inetmail.h:555
virtual void OnSEND(const PCaselessString &sender)
PBoolean LogIn(const PString &username, const PString &password)
Log into the SMTP server using the mailbox and access codes specified.
PBoolean extendedHello
Definition: inetmail.h:180
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:557
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:2184
PString username
Definition: inetmail.h:778
User cannot be forwarded.
Definition: inetmail.h:246
static const PCaselessString & ReturnPathTag()
void SetTransferEncoding(const PString &encoding, PBoolean autoTranslate=true)
Set the content transfer encoding.
PBoolean extendedHello
Definition: inetmail.h:407
virtual LookUpResult LookUpName(const PCaselessString &name, PString &expandedName)
Look up a name in the context of the SMTP server.
PBoolean DeleteMessage(PINDEX messageNumber)
Delete the message specified from the mail box.
PStringList toNames
Definition: inetmail.h:411
Definition: inetmail.h:82
A TCP/IP socket for the Simple Mail Transfer Protocol.
Definition: inetmail.h:216
Definition: inetmail.h:82
Some other error occurred in look up.
Definition: inetmail.h:265
Definition: inetmail.h:82
StuffState endMIMEDetectState
Definition: inetmail.h:415
virtual void OnUIDL(PINDEX msg)
Get unique ID for message in mailbox.
virtual void OnSAML(const PCaselessString &sender)
virtual void OnSendMail(const PCaselessString &sender)
PString fromAddress
Definition: inetmail.h:409
PStringList toDomains
Definition: inetmail.h:412
static const PCaselessString & BCCTag()
Definition: inetmail.h:466
User name was valid and unique.
Definition: inetmail.h:262
StuffState
Definition: inetprot.h:369
void SetBCC(const PString &bccAddress)
Set the Blind Carbon Copy address(es).
static const PCaselessString & MailerTag()
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
PMIMEInfo partHeaders
Definition: inetmail.h:1016
PBase64 * base64
Definition: inetmail.h:1018
A network communications channel.
Definition: socket.h:58
PBoolean ProcessCommand()
Process commands, dispatching to the appropriate virtual function.
PString apopBanner
Definition: inetmail.h:631
Definition: inetmail.h:81
Definition: inetmail.h:82
Definition: inetmail.h:80
PBoolean SendWithSMTP(const PString &hostname)
Send this message using an SMTP socket.
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:990
Commands
Definition: inetmail.h:464
virtual void OnTOP(PINDEX msg, PINDEX count)
virtual void OnVRFY(const PCaselessString &name)
Definition: inetmail.h:467
PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
PStringList boundaries
Definition: inetmail.h:1017
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.