86 namespace MailMessage {
166 bool importance =
False;
167 bool deliveryReceipt =
False;
168 bool readReceipt =
False;
182 *
string bodyContentType;
185 list attachments = ();
227 private processPart(
hash p);
500 static string doHeaderValue(
string hdr,
string val,
string eol =
"\r\n",
bool encode =
True);
546 static string encodeData(data data,
string mime,
string disp,
string enc);
555 static string getLine(reference msg, reference pos);
558 private list getEnvelopeList();
591 constructor(
string name,
string mime, data data,
string enc =
EncDefault, *
hash hdr);
616 add(MultiPartMixedMessage mpm);
constructor(string sender, string subject)
creates a Message object from the arguments given; this variant of the constructor is designed to be ...
string getHeaderString(string eol="\r\n", bool encode=True)
returns a string of the message headers
data getData()
returns the data of the Part
static hash parseHeader(string hdr, bool decode=True)
parses the given string representing a header line and returns a single key - value hash for the head...
addBody(string str)
concatenates a string to the message body
addHeader(string hdr)
adds a header to the Message
class representing a MIME part of a Message
Definition: MailMessage.qm.dox.h:570
const Encodings
a list of all known content encoding schemes encodings
Definition: MailMessage.qm.dox.h:107
*string getSender()
returns the sender's address in display format
string toLine()
returns a single line string summarizing the Message
list getParts()
returns a list of non-attachment Part objects for the Message
list getBCC()
returns the list of "BCC:" addresses
list getTO()
returns the list of "To:" addresses
The Message class holds the information for a single email Message.
Definition: MailMessage.qm.dox.h:153
static *string getEmailAddress(string str)
fetch the email address out of a sender/rcpt string
softlist getHeader()
returns the current Message headers as a list of strings
*hash getHeaders()
returns any headers for the Part
static string encodeTransferData(data data, string enc, reference hdr)
returns a string of message data according to the encoding passed
list getCC()
returns the list of "CC:" addresses
string getMime()
returns the mime type of the Part
string getSubject()
returns the subject of the Message
list addCC(string recipient)
add a recipient to the Message's cc list
bool sendPossible()
returns True if the message can be sent, False if not
const ContentTransEncBase64
attach(string name, string mime, data att, string enc=EncDefault, *hash hdr)
creates an attachment for the Message
string replace(string str, string source, string target, int start=0, int end=-1)
*hash getHeaders()
returns the current Message headers as a hash
const EncQuotedPrintable
"quoted-printable" content transfer encoding
Definition: MailMessage.qm.dox.h:104
bool important()
returns the current importance setting
class representing a MIME Attachment for the Message
Definition: MailMessage.qm.dox.h:636
*data getBody()
returns the Message body
list getAttachments()
returns a list of Attachment objects for the Message
constructor(string name, string mime, data data, string enc=EncDefault, *hash hdr)
creates an Attachment object for a Message object
list addTO(string recipient)
add a recipient to the Message's recipient list
bool receiptRead()
returns the current read delivery receipt setting
list getRecipients()
return all the email addresses the message will be sent to, a combination of the "To:", "CC:", and "BCC:" lists
string mpboundary
create a different multipart boundary string every time based on the current time ...
Definition: MailMessage.qm.dox.h:197
static string checkEncoding(data data, string enc, bool noneok=False)
checks the data against the encoding and returns the new encoding (if the encoding is EncDefault for ...
string toString(bool body=False)
returns a multi-line string representing the Message
string getTransferEncoding()
returns the transfer encoding of the Part
string serialize()
serializes the message to a string that can be sent to an SMTP server, for example ...
const EncBase64
base-64 content transfer encoding
Definition: MailMessage.qm.dox.h:101
static string doHeaderValue(string hdr, string val, string eol="\r\n", bool encode=True)
encodes a header value according to the parameters
string getBodyTransferEncoding()
returns the transfer encoding for the mssage body (see Message Encodings for possible values) ...
const ContentTransEncQuotedPrintable
setHeader(string hdr)
sets/replaces the Message headers
static string getLine(reference msg, reference pos)
returns the first "\r\n" terminated line from the argument, updates the byte position argument ...
const EncNone
no content transfer encoding (not recommended as SMTP servers break up long lines automatically) ...
Definition: MailMessage.qm.dox.h:98
add(MultiPartMixedMessage mpm)
adds itself to a multipart/mixed message
static string encodeData(data data, string mime, string disp, string enc)
returns a string of message data according to the encoding passed
string getName()
returns the name of the Part
static bool checkEmailAddress(string str)
returns True if the string contains an email address, False if not
*string getFrom()
returns the sender's email address
list addBCC(string recipient)
add a recipient to the Message's bcc list
bool receiptDelivery()
returns the delivery receipt setting
setBody(data body, string enc=EncDefault, *string content_type)
sets or replaces the Message body
string makeBase64String(string str, softint maxlinelen=-1)
checkSendPossible()
throws a MESSAGE-ERROR exception if the Message cannot be sent
const EncDefault
default content transfer encoding depending on attachment type
Definition: MailMessage.qm.dox.h:95