io
Packages
Interfaces
Classes
Files

Class: Mail

Source Location: /io/mail.class.php [line 38]

Class Overview


This class allows you to send mails without having to deal with the mail headers and parameters.

Author(s):



Class Details

This class allows you to send mails without having to deal with the mail headers and parameters.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Mail [line 43]

Mail Mail( )
Builds a Mail object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_content [line 167]

string get_content( )
Returns the mail content.

Tags:

  • return: The mail content.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_headers [line 176]

string get_headers( )
Returns the mail headers.

Tags:

  • return: The mail headers.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_mime [line 194]

string get_mime( )
Returns the MIME type of the mail content

Returns the MIME type of the mail content

Tags:

  • return: the MIME type
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_object [line 158]

string get_object( )
Returns the mail object.

Tags:

  • return: The mail object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_recipients [line 149]

string get_recipients( )
Returns the mail recipients' addresses. They are separated by a comma.

Tags:

  • return: The mail recipients.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_sender_mail [line 131]

string get_sender_mail( )
Returns the mail address of the sender.

Tags:

  • return: the sender's mail address
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_sender_name [line 140]

string get_sender_name( )
Returns the mail sender's name.

Tags:

  • return: The mail sender's name.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method send [line 233]

bool send( )
Sends the mail.

Tags:

  • return: True if the mail could be sent, false otherwise.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method send_from_properties [line 210]

bool send_from_properties( string $mail_to, string $mail_object, string $mail_content, string $mail_from, [string $mail_header = null], [string $sender_name = 'admin'])
Sends the mail.

Tags:

  • return: True if the mail could be sent, false otherwise.
  • deprecated:

Parameters:

string   $mail_to   The mail recipients' address.
string   $mail_object   The mail object.
string   $mail_content   content of the mail
string   $mail_from   The mail sender's address.
string   $mail_header   The header you want to specify (it you don't specify it, it will be generated automatically).
string   $sender_name   The mail sender's name. If you don't use this parameter, the name of the site administrator will be taken.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_content [line 113]

void set_content( string $content)
The mail content.

Parameters:

string   $content   The mail content
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_headers [line 122]

void set_headers( string $headers)
Sets the headers. Forces them, they won't be generated automatically.

Parameters:

string   $headers   The mail headers.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_mime [line 185]

void set_mime( string $mime)
Sets the MIME type of the mail content

Sets the MIME type of the mail content

Parameters:

string   $mime   MIME_FORMAT_TEXT or MIME_FORMAT_HTML
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_object [line 104]

void set_object( string $object)
Sets the mail object

Parameters:

string   $object   Mail object
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_recipients [line 73]

void set_recipients( string $recipients)
Sets the recipient(s) of the mail.

Parameters:

string   $recipients   Recipients of the mail. It they are more than one, use the comma to separate their addresses.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_sender [line 53]

bool set_sender( string $sender, [string $sender_name = 'admin'])
Sets the mail sender.

Tags:

  • return: True, if the mail sender address is correct, false otherwise.

Parameters:

string   $sender   The mail sender address.
string   $sender_name   'admin' if the mail is sent by the administrator, 'user' otherwise.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method _generate_headers [line 260]

void _generate_headers( )
Generates the mail headers.

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method check_validity [line 249]

static bool check_validity( $mail_address)
Checks that an email address has a correct form.

Tags:

  • return: True if it's valid, false otherwise.

Parameters:

   $mail_address  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 307]   string  $content  =  ''

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    [line 332]   string  $format  =  MIME_FORMAT_TEXT

    Tags:

      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
      [line 322]   The  $headers  =  ''

      Tags:

        [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
        [line 302]   sting  $object  =  ''

        Tags:

          [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
          [line 327]   string[]  $recipients  = array()

          Tags:

            [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
            [line 312]   string  $sender_mail  =  ''

            Tags:

              [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
              [line 317]   string  $sender_name  =  ''

              Tags:

                [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
                Documentation generated on Tue, 28 Jul 2009 22:43:39 +0200 by phpDocumentor 1.4.1