emailemail 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)
email
email
([string $from = ""], [string $to = ""], [string $subject = ""], [string $body = ""], [string $headers = ""], [string $mimecontenttype = CONTENT_TEXT], [string $mimeboundary = ""])
void
attach
(string $data, [mixed $description = ""], [string $contenttype = CONTENT_OCTET], [string $encoding = ENC_BASE64], [string $disp = ""])
void
attach_file
(string $path, [mixed $description = ""], [string $contenttype = CONTENT_OCTET], [string $encoding = ENC_BASE64], [string $disp = ""])
mixed
$base64_func
= "" (line 118)
If !specified use PHP's base64
mixed
$bcc
= array() (line 94)
Bcc: (blind copies to) header
mixed
$body
= "" (line 100)
e-mail body text
mixed
$cc
= array() (line 92)
Cc: (copies to) header
mixed
$charset
= DEFAULT_CHARSET (line 133)
character set to use for the e-mail
mixed
$content
= "" (line 124)
E-mail body + headers minus From: and Subject:
mixed
$email_headers
= array() (line 115)
All e-mail headers end up here, apart from To: This
mixed
$errors
= array() (line 105)
Accumulated errors
mixed
$extra_headers
= array() (line 110)
Extra ad-hoc e-mail headers added from external
mixed
$from
= "" (line 88)
e-mail From address
mixed
$mimeboundary
= "" (line 130)
MIME boundary marker to use
mixed
$mimecontenttype
= CONTENT_TEXT (line 127)
MIME content type for the e-mail
mixed
$mimeparts
= array() (line 136)
Assembled mime attachments
mixed
$qp_func
= "" (line 121)
None at this time
mixed
$replyto
= "" (line 96)
e-mail ReplyTo address
mixed
$subject
= "" (line 98)
Subject of the e-mail
mixed
$to
= array() (line 90)
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