PHPonTrax
[ class tree: PHPonTrax ] [ index: PHPonTrax ] [ all elements ]

Class: ActionMailer

Source Location: /vendor/trax/action_mailer.php

Class Overview




Variables

Methods


Child classes:


Class Details

[line 41]


[ Top ]


Class Variables

$body = array()

[line 73]



Tags:

access:  public

Type:   mixed


[ Top ]

$content_type =  "text"

[line 77]



Tags:

access:  public

Type:   mixed


[ Top ]

$crlf =

[line 76]



Tags:

access:  public

Type:   mixed


[ Top ]

$default_charset =  "utf-8"

[line 62]



Tags:

access:  public

Type:   mixed


[ Top ]

$default_from =  null

[line 72]



Tags:

access:  public

Type:   mixed


[ Top ]

$deliveries = array()

[line 68]



Tags:

access:  public

Type:   mixed


[ Top ]

$delivery_method =

[line 61]



Tags:

access:  public

Type:   mixed


[ Top ]

$errors = array()

[line 46]



Tags:

access:  private
usedby:  ActionMailer::get_errors()
usedby:  ActionMailer::add_error()

Type:   mixed


[ Top ]

$from =  null

[line 71]



Tags:

access:  public

Type:   mixed


[ Top ]

$headers = array()

[line 75]



Tags:

access:  public
usedby:  ActionMailer::set_header_line()

Type:   mixed


[ Top ]

$head_charset =  null

[line 63]



Tags:

access:  public

Type:   mixed


[ Top ]

$html_charset =  null

[line 64]



Tags:

access:  public

Type:   mixed


[ Top ]

$mail =  null

[line 44]



Tags:

access:  private

Type:   mixed


[ Top ]

$mail_mime =  null

[line 44]



Tags:

access:  private

Type:   mixed


[ Top ]

$mime_params = array()

[line 45]



Tags:

access:  private

Type:   mixed


[ Top ]

$perform_deliveries =

[line 61]



Tags:

access:  public

Type:   mixed


[ Top ]

$preparse_body = array()

[line 74]



Tags:

access:  public

Type:   mixed


[ Top ]

$recipients =

[line 69]



Tags:

access:  public

Type:   mixed


[ Top ]

$sendmail_settings = array(
            'path' => '/usr/sbin/sendmail',
            'args' => '-i -t'
        )

[line 57]



Tags:

access:  public

Type:   mixed


[ Top ]

$smtp_settings = array( 
            'host'      => 'localhost', # The server to connect.
            'port'      => 25,  # The port to connect.
            'persist'   => false, # Indicates whether or not the SMTP connection should persist over multiple sends.
            'auth'      => false, # Whether or not to use SMTP authentication.
            'username'  => null, # The username to use for SMTP authentication.
            'password'  => null, # The password to use for SMTP authentication.            
        )

[line 49]



Tags:

access:  public

Type:   mixed


[ Top ]

$subject =  null

[line 70]



Tags:

access:  public

Type:   mixed


[ Top ]

$template =  null

[line 66]



Tags:

access:  public

Type:   mixed


[ Top ]

$template_root =  null

[line 67]



Tags:

access:  public

Type:   mixed


[ Top ]

$text_charset =  null

[line 65]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 84]

ActionMailer __construct( )

ActionMailer constructor.



Tags:

todo:  Document this API


[ Top ]

method add_attachment [line 360]

void add_attachment( $file, [ $content_type = 'application/octet-stream'], [ $file_name = ''], [ $is_file = true], [ $encoding = 'base64'])

Add an attachment to an email.



Tags:

todo:  Document this API


Parameters:

   $file  
   $content_type  
   $file_name  
   $is_file  
   $encoding  

[ Top ]

method add_error [line 409]

void add_error( string $error, [string $key = null])

Add or overwrite description of an error to the list of errors



Tags:



Parameters:

string   $error   Error message text
string   $key   Key to associate with the error (in the simple case, column name). If omitted, numeric keys will be assigned starting with 0. If specified and the key already exists in $errors, the old error message will be overwritten with the value of $error.

[ Top ]

method create_mail [line 238]

void create_mail( $method_name, [ $parameters = array()])

Sets up and creates the email for deliver().



Tags:

todo:  Document this API
access:  private


Parameters:

   $method_name  
   $parameters  

[ Top ]

method deliver [line 334]

void deliver( [ $mail = null])

Sends the email loaded into this object via create_mail().



Tags:

todo:  Document this API


Parameters:

   $mail  

[ Top ]

method encoded [line 317]

void encoded( [ $add_pre_tags = false])

Return a text version of the email currently loaded.



Tags:

todo:  Document this API


Parameters:

   $add_pre_tags  

[ Top ]

method format_emails [line 163]

void format_emails( $emails, [ $type = null])

Format an array of emails into a correct string / validate emails.



Tags:

todo:  Document this API
access:  private


Parameters:

   $emails  
   $type  

[ Top ]

method get_errors [line 432]

mixed get_errors( [boolean $return_string = false], [string $seperator = "<br>"])

Return description of non-fatal errors



Tags:

return:  Error description(s), if any
uses:  ActionMailer::$errors


Parameters:

boolean   $return_string  
  • true => Concatenate all error descriptions into a string using $seperator between elements and return the string
  • false => Return the error descriptions as an array
string   $seperator   String to concatenate between error descriptions if $return_string == true

[ Top ]

method get_errors_as_string [line 449]

string get_errors_as_string( [string $seperator = "<br>"])

Return errors as a string.

Concatenate all error descriptions into a stringusing $seperator between elements and return the string.




Tags:

return:  Concatenated error description(s), if any


Parameters:

string   $seperator   String to concatenate between error descriptions

[ Top ]

method initialize_defaults [line 217]

void initialize_defaults( $method_name)

Sets up default class variables for this mailer. Classes extending ActionMailer can override these values.



Tags:

todo:  Document this API
access:  private


Parameters:

   $method_name  

[ Top ]

method render_message [line 277]

void render_message( $method_name, [ $body = array()])

Load the template view file for the body of the email.



Tags:

todo:  Document this API


Parameters:

   $method_name  
   $body  

[ Top ]

method render_partial [line 301]

void render_partial( $path, [ $options = array()])

Uses ActionControllers render_partial method.



Tags:

todo:  Document this API


Parameters:

   $path  
   $options  

[ Top ]

method set_headers [line 113]

void set_headers( )

Set all the necessary email headers



Tags:

todo:  Document this API
access:  private


[ Top ]

method set_header_line [line 393]

void set_header_line( string $header_key, string $header_value)

Set a single line for the header of an email



Tags:



Parameters:

string   $header_key   key for the header line (To:, From:, Subject:, etc)
string   $header_value   value for the $header_key

[ Top ]

method set_html_body [line 206]

void set_html_body( $html)

Set the html body of the email.



Tags:

todo:  Document this API
access:  private


Parameters:

   $html  

[ Top ]

method set_text_body [line 196]

void set_text_body( $text)

Set the text body of the email.



Tags:

todo:  Document this API
access:  private


Parameters:

   $text  

[ Top ]

method validate_email [line 376]

boolean validate_email( string $email)

Validates a single email address



Tags:

return:  
  • true => Valid email, no errors found.
  • false => Email not valid


Parameters:

string   $email   Validates the input $email is in format: user@domain.com or "John Smith <user@domain.com>"

[ Top ]

method __call [line 92]

void __call( $method_name, $parameters)

Override call() to do some magic where you can call create_*() and deliver_*().



Tags:

todo:  Document this API


Parameters:

   $method_name  
   $parameters  

[ Top ]


Documentation generated on Mon, 21 May 2007 22:27:52 -0600 by phpDocumentor 1.3.2