Class Support_Mail_Msg

Description

Simple class for constructing an HTML mail message

Located in /support/lib/Support/Mail/Msg.php (line 9)


	
			
Variable Summary
 mixed $attachments
 string $boundary
 array $headers
 string $html
 array $recipients
 string $subject
 string $text
Method Summary
 Support_Mail_Msg __construct (mixed $recipients, string $subject, [array $headers = NULL])
 void assemble_body ()
 void assemble_header ()
 void assemble_mixed ()
 void clean (string $value, [bool $allowNewLines = FALSE])
 boolean has_alternatives ()
 boolean has_header (string $name)
 string header (string $name)
 boolean message_mime_type ()
 array recipients ()
 void send ()
 void set_header (string $name, string $value)
 void set_html_body (string $body)
 void set_text_body (string $body)
 string subject ()
Variables
mixed $attachments (line 48)

Attachments

  • access: protected
string $boundary = "--=_NextPart_000_000E_01C5256B.0AEFE730" (line 39)

MIME boundary

  • access: protected
array $headers (line 24)

Additional mail headers as an associative array

  • access: protected
string $html = NULL (line 34)

HTML body

  • access: protected
string $outerBoundary = "--=_NextPart_001_01C8E2C1.C11DE4B3" (line 44)

Outer MIME boundary (for attachemnts)

  • access: protected
array $recipients (line 14)

List of message recipients

  • access: protected
string $subject (line 19)

Message subject

  • access: protected
string $text = NULL (line 29)

Text body

  • access: protected
Methods
Constructor __construct (line 57)

Constructor

  • access: public
Support_Mail_Msg __construct (mixed $recipients, string $subject, [array $headers = NULL])
  • mixed $recipients: A single recipient or array of recipients
  • string $subject: Subject for the message
  • array $headers: An associative array of additional headers
add_attachment (line 135)

Add an attachment

  • access: public
void add_attachment (Support_Mail_Attachment $attachment)
assemble_alternative (line 224)

Assembles an alternative body

  • access: protected
void assemble_alternative ()
assemble_body (line 182)

Assemble and return the body

  • access: public
void assemble_body ()
assemble_header (line 168)

Assemble and return the header

  • access: public
void assemble_header ()
assemble_mixed (line 248)

Assembles a mixed body with an alternative one inside

  • access: protected
void assemble_mixed ()
clean (line 146)

Strip non-printable characters from a value

  • access: public
void clean (string $value, [bool $allowNewLines = FALSE])
  • string $value: The value to clean
  • bool $allowNewLines: Whether or not to allow newlines (default FALSE)
has_alternatives (line 202)

Returns true if the message contains alternative formats

  • access: public
boolean has_alternatives ()
has_header (line 90)

Return true if the specified header has a value

  • access: public
boolean has_header (string $name)
  • string $name: The name of the header to check
header (line 80)

Return the value of a header field

  • access: public
string header (string $name)
  • string $name: The name of the header
message_mime_type (line 211)

Return the underlying message mime type (irrespective of attachments)

  • access: public
boolean message_mime_type ()
recipients (line 108)

Return the message's recipients

  • access: public
array recipients ()
send (line 290)

Send the mail message

  • access: public
void send ()
set_header (line 70)

Add a header field

  • access: public
void set_header (string $name, string $value)
  • string $name: The name of the field
  • string $value: The value for the header
set_html_body (line 126)

Set the HTML body

  • access: public
void set_html_body (string $body)
  • string $body
set_text_body (line 117)

Set the text body

  • access: public
void set_text_body (string $body)
  • string $body
subject (line 99)

Return the message's subject

  • access: public
string subject ()

Documentation generated on Wed, 25 Apr 2012 09:46:43 -0700 by phpDocumentor 1.4.3