email class A class which encapsulates all the functions required to compose and send an e-mail message. Also caters for MIME attachments.
Located in /mail-defs.php (line 85)
If !specified use PHP's base64
Bcc: (blind copies to) header
e-mail body text
Cc: (copies to) header
character set to use for the e-mail
E-mail body + headers minus From: and Subject:
All e-mail headers end up here, apart from To: This
Accumulated errors
Extra ad-hoc e-mail headers added from external
e-mail From address
MIME boundary marker to use
MIME content type for the e-mail
Assembled mime attachments
None at this time
e-mail ReplyTo address
Subject of the e-mail
Address to send e-mail
Constructor Creates the basic email object.
Append new content to the body of the email.
Generic function to add a header. We store our headers in an associative array, keyed on the proper-cased header name, so we avoid duplicates.
Wrapper for general binary attachments. We assume a MIME content type of multipart/mixed for these..
Attaches a 'file' to the e-mail message. Pass a file pathname to attach.
This function returns a success/failure code/key of current attachment in array (+1). @see attach()
Just a convenient wrapper for adding HTML attachments. Note that with
this call we are assuming that we are going to be sending an e-mail with a plain text and an HTML equivalent. This is why we set the MIME content type to "multipart/alternative" here. This can be over-ridden using the parameter in the send(0 function.
Set blind copies-to Set the e-mail Bcc: e-mail addresses for blind copies to.
The supplied e-mail addresses can be a comma-delimited list. NB: Every time this method is called, addresses are appended.
Set body
Set the e-mail body content
Set copies-to Set the e-mail Cc: e-mail addresses for copies to.
The supplied e-mail addresses can be a comma-delimited list. NB: Every time this method is called, addresses are appended.
Set the character set encoding for the email.
Return error messages. These may have accumulated during the email assembly or during the send process.
Generic method to add an extra header. This method is now preferred over the depreceted 'add_header()' method above. We store our headers in an associative array, keyed on the proper-cased header name.
Set from Set the e-mail From: e-mail addresses.
Return Printable Content Returns a printable version of the e-mail. Just returns the content as well as all the headers, and if for HTML, then it wraps it all in some (pre) tags. Useful for debugging.
Set replyto Set the e-mail ReplyTo: e-mail address.
Send the email Send mail via local mailer. This is usually the end-result of an e-mail sequence and results in the e-mail being sent.
Set subject
Set the e-mail Subject: header
Set to Set the e-mail To: e-mail addresses.
The supplied e-mail addresses can be a comma-delimited list. NB: Every time this method is called, addresses are appended.
Documentation generated by phpDocumentor 1.3.0RC3