185 bool importance =
False;
186 bool deliveryReceipt =
False;
187 bool readReceipt =
False;
201 *
string bodyContentType;
204 list<Attachment> attachments();
264 list<string>
addTO(
string recipient);
273 list<string>
addCC(
string recipient);
282 list<string>
addBCC(
string recipient);
294 list<string>
getTO();
298 list<string>
getCC();
522 static string doHeaderValue(
string hdr,
string val,
string eol =
"\r\n",
bool encode =
True);
567 static string encodeData(data data,
string mime,
string disp,
string enc);
576 static string getLine(reference<string> msg, reference<int> pos);
581 list<string> getEnvelopeList();
615 constructor(
string filename,
string mimetype, data filedata,
string encoding =
EncDefault, *
hash hdr);
640 add(MultiPartMixedMessage mpm);
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
string getHeaderString(string eol="\", bool encode=True)
returns a string of the message headers
list< Attachment > getAttachments()
returns a list of Attachment objects for the Message
addHeader(string hdr)
adds a header to the Message
class representing a MIME part of a Message
Definition: MailMessage.qm.dox.h:594
const Encodings
a list of all known content encoding schemes encodings
Definition: MailMessage.qm.dox.h:126
static string encodeTransferData(data data, string enc, reference< hash > hdr)
returns a string of message data according to the encoding passed
*string getSender()
returns the sender's address in display format
string toLine()
returns a single line string summarizing the Message
The Message class holds the information for a single email Message.
Definition: MailMessage.qm.dox.h:172
string make_base64_string(string str, softint maxlinelen=-1)
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
string getMime()
returns the mime type of the Part
string getSubject()
returns the subject of the Message
list< string > getTO()
returns the list of "To:" addresses
bool sendPossible()
returns True if the message can be sent, False if not
static string doHeaderValue(string hdr, string val, string eol="\", bool encode=True)
encodes a header value according to the parameters
list< string > getCC()
returns the list of "CC:" addresses
list< string > addBCC(string recipient)
add a recipient to the Message's bcc list
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:123
bool important()
returns the current importance setting
class representing a MIME Attachment for the Message
Definition: MailMessage.qm.dox.h:660
*data getBody()
returns the Message body
list< Part > getParts()
returns a list of non-attachment Part objects for the Message
constructor(string name, string mime, data data, string enc=EncDefault, *hash hdr)
creates an Attachment object for a Message object
constructor(string n_sender, string n_subject)
creates a Message object from the arguments given; this variant of the constructor is designed to be ...
bool receiptRead()
returns the current read delivery receipt setting
string mpboundary
create a different multipart boundary string every time based on the current time ...
Definition: MailMessage.qm.dox.h:216
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 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:120
string getBodyTransferEncoding()
returns the transfer encoding for the mssage body (see Message Encodings for possible values) ...
list< string > getRecipients()
return all the email addresses the message will be sent to, a combination of the "To:", "CC:", and "BCC:" lists
const ContentTransEncQuotedPrintable
static string getLine(reference< string > msg, reference< int > pos)
returns the first "\r\n" terminated line from the argument, updates the byte position argument ...
setHeader(string hdr)
sets/replaces the Message headers
setBody(data n_body, string n_enc=EncDefault, *string n_content_type)
sets or replaces the Message body
const EncNone
no content transfer encoding (not recommended as SMTP servers break up long lines automatically) ...
Definition: MailMessage.qm.dox.h:117
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
list< string > getBCC()
returns the list of "BCC:" addresses
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
bool receiptDelivery()
returns the delivery receipt setting
the MailMessage namespace holds all public definitions in the MailMessage module
Definition: MailMessage.qm.dox.h:105
checkSendPossible()
throws a MESSAGE-ERROR exception if the Message cannot be sent
list< string > addCC(string recipient)
add a recipient to the Message's cc list
list< string > addTO(string recipient)
add a recipient to the Message's recipient list
const EncDefault
default content transfer encoding depending on attachment type
Definition: MailMessage.qm.dox.h:114
string toString(bool include_body=False)
returns a multi-line string representing the Message