|
ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
this class encapsulates the PHP mail() function. More...
Collaboration diagram for ilMimeMail:Public Member Functions | |
| __construct () | |
| Mail contructor. More... | |
| autoCheck ($bool) | |
| activate or desactivate the email addresses validator ex: autoCheck( true ) turn the validator on by default autoCheck feature is on More... | |
| Subject ($subject, $a_add_prefix=false) | |
| Define the subject line of the email. More... | |
| From ($from) | |
| set the sender of the mail More... | |
| ReplyTo ( $address) | |
| set the Reply-to header More... | |
| Receipt () | |
| add a receipt to the mail ie. More... | |
| To ( $to) | |
| set the mail recipient More... | |
| Cc ($cc) | |
| Cc() cc : email address(es), accept both array and string. More... | |
| Bcc ( $bcc) | |
| Bcc() set the Bcc headers ( blank carbon copy ). More... | |
| Body ( $body, $charset="") | |
| Body( text [, charset] ) set the body (message) of the mail define the charset if the message contains extended characters (accents) default to us-ascii $mail->Body( "m�l en fran�ais avec des accents", "iso-8859-1" );. More... | |
| Organization ( $org) | |
| Organization( $org ) set the Organization header. More... | |
| Priority ( $priority) | |
| Priority( $priority ) set the mail priority $priority : integer taken between 1 (highest) and 5 ( lowest ) ex: $mail->Priority(1) ; => Highest. More... | |
| Attach ( $filename, $filetype="", $disposition="inline", $display_name=null) | |
| Attach a file to the mail. More... | |
| Send () | |
| fornat and send the mail @access public More... | |
| Get () | |
| return the whole e-mail , headers + message can be used for displaying the message in plain text or logging it More... | |
| ValidEmail ($address) | |
| check an email address validity @access public More... | |
| CheckAdresses ( $aad) | |
| check validity of email addresses return if unvalid, output an error message and exit, this may -should- be customized More... | |
| _build_attachement () | |
| check and encode attach file(s) . More... | |
| _mimeEncode ($a_string) | |
Data Fields | |
| $sendto = array() | |
| $acc = array() | |
| $abcc = array() | |
| $xheaders = array() | |
| $priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' ) | |
| $charset = "utf-8" | |
| $ctencoding = "8bit" | |
| $receipt = 0 | |
Protected Attributes | |
| $aattach = array() | |
| $adisplay = array() | |
this class encapsulates the PHP mail() function.
implements CC, Bcc, Priority headers include "libmail.php"; $m= new Mail; // create the mail $m->From( "leo@isp.com" ); $m->To( "destination@somewhere.fr" ); $m->Subject( "the subject of the mail" ); $message= "Hello world!\nthis is a test of the Mail class\nplease ignore\nThanks."; $m->Body( $message); // set the body $m->Cc( "someone@somewhere.fr"); $m->Bcc( "someoneelse@somewhere.fr"); $m->Priority(4) ; // set the priority to Low m->Attach( "/home/leo/toto.gif", "image/gif" ) ; // attach a file of type image/gif $m->Send(); // send the mail echo "the mail below has been sent:<br><pre>", $m->Get(), "</pre>";
Definition at line 28 of file class.ilMimeMail.php.
| ilMimeMail::__construct | ( | ) |
Mail contructor.
Definition at line 80 of file class.ilMimeMail.php.
References autoCheck().
Here is the call graph for this function:| ilMimeMail::_build_attachement | ( | ) |
check and encode attach file(s) .
internal use only @access private
Definition at line 554 of file class.ilMimeMail.php.
| ilMimeMail::_mimeEncode | ( | $a_string | ) |
Definition at line 598 of file class.ilMimeMail.php.
Referenced by ilMail\addFullname().
Here is the caller graph for this function:| ilMimeMail::Attach | ( | $filename, | |
$filetype = "", |
|||
$disposition = "inline", |
|||
$display_name = null |
|||
| ) |
Attach a file to the mail.
| string | filename : path of the file to attach | |
| string | filetype : MIME-type of the file. default to 'application/x-unknown-content-type' | |
| string | disposition : instruct the Mailclient to display the file if possible ("inline") or always as a link ("attachment") possible values are "inline", "attachment" | |
| string | $display_name, | filename to use in email (if different from source file) |
Definition at line 303 of file class.ilMimeMail.php.
References $filename.
| ilMimeMail::autoCheck | ( | $bool | ) |
activate or desactivate the email addresses validator ex: autoCheck( true ) turn the validator on by default autoCheck feature is on
| boolean | set to true to turn on the auto validation @access public |
Definition at line 93 of file class.ilMimeMail.php.
Referenced by __construct().
Here is the caller graph for this function:| ilMimeMail::Bcc | ( | $bcc | ) |
Bcc() set the Bcc headers ( blank carbon copy ).
bcc : email address(es), accept both array and string
| string | bcc |
Definition at line 219 of file class.ilMimeMail.php.
References CheckAdresses().
Here is the call graph for this function:| ilMimeMail::Body | ( | $body, | |
$charset = "" |
|||
| ) |
Body( text [, charset] ) set the body (message) of the mail define the charset if the message contains extended characters (accents) default to us-ascii $mail->Body( "m�l en fran�ais avec des accents", "iso-8859-1" );.
| string | body |
| string | charset (optional) |
Definition at line 245 of file class.ilMimeMail.php.
References $charset.
| ilMimeMail::Cc | ( | $cc | ) |
Cc() cc : email address(es), accept both array and string.
| string | cc set the CC headers ( carbon copy ) |
Definition at line 196 of file class.ilMimeMail.php.
References CheckAdresses().
Here is the call graph for this function:| ilMimeMail::CheckAdresses | ( | $aad | ) |
check validity of email addresses return if unvalid, output an error message and exit, this may -should- be customized
| array | aad - |
Definition at line 539 of file class.ilMimeMail.php.
References exit, and ValidEmail().
Referenced by Bcc(), Cc(), and To().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMimeMail::From | ( | $from | ) |
set the sender of the mail
| string | from should be an email address |
Definition at line 128 of file class.ilMimeMail.php.
References exit.
Referenced by ilPurchaseBaseGUI\__sendBill().
Here is the caller graph for this function:| ilMimeMail::Get | ( | ) |
return the whole e-mail , headers + message can be used for displaying the message in plain text or logging it
Definition at line 503 of file class.ilMimeMail.php.
| ilMimeMail::Organization | ( | $org | ) |
Organization( $org ) set the Organization header.
| string | organization |
Definition at line 264 of file class.ilMimeMail.php.
| ilMimeMail::Priority | ( | $priority | ) |
Priority( $priority ) set the mail priority $priority : integer taken between 1 (highest) and 5 ( lowest ) ex: $mail->Priority(1) ; => Highest.
| integer | priority |
Definition at line 279 of file class.ilMimeMail.php.
| ilMimeMail::Receipt | ( | ) |
add a receipt to the mail ie.
a confirmation is returned to the "From" address (or "ReplyTo" if defined) when the receiver opens the message.
Definition at line 163 of file class.ilMimeMail.php.
| ilMimeMail::ReplyTo | ( | $address | ) |
set the Reply-to header
| string | address should be an email address |
Definition at line 148 of file class.ilMimeMail.php.
| ilMimeMail::Send | ( | ) |
fornat and send the mail @access public
Definition at line 494 of file class.ilMimeMail.php.
| ilMimeMail::Subject | ( | $subject, | |
$a_add_prefix = false |
|||
| ) |
Define the subject line of the email.
| string | subject any monoline string |
Definition at line 109 of file class.ilMimeMail.php.
References ilMail\getSubjectPrefix().
Here is the call graph for this function:| ilMimeMail::To | ( | $to | ) |
set the mail recipient
| string | to email address, accept both a single address or an array of addresses |
Definition at line 172 of file class.ilMimeMail.php.
References CheckAdresses().
Here is the call graph for this function:| ilMimeMail::ValidEmail | ( | $address | ) |
check an email address validity @access public
| string | address : email address to check |
Definition at line 519 of file class.ilMimeMail.php.
Referenced by CheckAdresses().
Here is the caller graph for this function:
|
protected |
Definition at line 50 of file class.ilMimeMail.php.
| ilMimeMail::$abcc = array() |
Definition at line 44 of file class.ilMimeMail.php.
| ilMimeMail::$acc = array() |
Definition at line 39 of file class.ilMimeMail.php.
|
protected |
Definition at line 55 of file class.ilMimeMail.php.
| ilMimeMail::$charset = "utf-8" |
Definition at line 73 of file class.ilMimeMail.php.
Referenced by Body().
| ilMimeMail::$ctencoding = "8bit" |
Definition at line 74 of file class.ilMimeMail.php.
| ilMimeMail::$priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' ) |
Definition at line 67 of file class.ilMimeMail.php.
| ilMimeMail::$receipt = 0 |
Definition at line 75 of file class.ilMimeMail.php.
| ilMimeMail::$sendto = array() |
Definition at line 34 of file class.ilMimeMail.php.
| ilMimeMail::$xheaders = array() |
Definition at line 61 of file class.ilMimeMail.php.