Public Member Functions |
| __construct () |
| loads the config
|
| addAddress ($address, $name) |
| adds an address to the send stack
|
| setSubject ($text) |
| sets the subject of the mail
|
| setMessage ($text) |
| sets the message of the mail
|
| email ($au, $subject, $message, $to=array("all")) |
| perpares the email and send it
|
| email_users ($to, $to_name, $subject, $message) |
| perpares an email to a user and sends it
|
| display_email_edit ($poll, $au, $subject='', $message='') |
| displays the email composing form. needs a valid <form> html tag before and after
|
| handle_email_edit ($poll, $au) |
| handles the form input and sends the email
|
Private Member Functions |
| load_config () |
| loads the config and throws exceptions used by constructor
- Exceptions
-
Exception | "Fehlconfiguration" |
|
| sendmail () |
| actually send the email acording to the internal config.
|
Private Attributes |
| $method = '' |
| the method of sending emails. Actually only "groups", which means there is one email-address per group
|
| $authSecure = '' |
| "ssl", the encryption method
|
| $mailer = '' |
| "smtp", the email sender programm. smtp means there is an external smtp server.
|
| $message = '' |
| the message of the email, needs to be not empty
|
| $addressList = array() |
| the address list we are sending to. array of array where index0 is the address and index1 the name, needs to be not empty
|
| $subject = '' |
| the subject of the email, needs to be not empty
|
Detailed Description
Definition at line 28 of file email.class.php.
Constructor & Destructor Documentation
Member Function Documentation
addAddress |
( |
|
$address, |
|
|
|
$name |
|
) |
| |
adds an address to the send stack
- Parameters
-
string | $address | a valid email-address |
string | $name | the name of the address owner |
Definition at line 101 of file email.class.php.
display_email_edit |
( |
|
$poll, |
|
|
|
$au, |
|
|
|
$subject = '' , |
|
|
|
$message = '' |
|
) |
| |
displays the email composing form. needs a valid <form> html tag before and after
- Parameters
-
poll | $poll | poll object |
auth | $au | (LSAP OR MYSQL authentification object) |
string | $subject | the subject of the message |
string | $message | the Text of the message |
Definition at line 296 of file email.class.php.
email |
( |
|
$au, |
|
|
|
$subject, |
|
|
|
$message, |
|
|
|
$to = array("all") |
|
) |
| |
perpares the email and send it
- Parameters
-
auth | $au | (LSAP OR MYSQL authentification object) |
string | $subject | the email's subject |
string | $message | the email's message |
array | $to,a | list of groupIDs, the keyword "all" means the email is send to all teacher groups |
- Returns
- NULL when the metod is not valid, string with error message or true on success
- Exceptions
-
Definition at line 213 of file email.class.php.
email_users |
( |
|
$to, |
|
|
|
$to_name, |
|
|
|
$subject, |
|
|
|
$message |
|
) |
| |
perpares an email to a user and sends it
- Parameters
-
string | $to | email adress we want send to |
string | $to_name | the name belonging to the address |
string | $message | the email's message |
- Returns
- string with error message or true on success
- Exceptions
-
Definition at line 265 of file email.class.php.
handle_email_edit |
( |
|
$poll, |
|
|
|
$au |
|
) |
| |
handles the form input and sends the email
- Parameters
-
polls | $poll | the poll object |
auth | $au | (LSAP OR MYSQL authentification object) |
- Returns
- bool true on success, else string with errormessage
Definition at line 351 of file email.class.php.
loads the config and throws exceptions used by constructor
- Exceptions
-
Exception | "Fehlconfiguration" |
Definition at line 51 of file email.class.php.
actually send the email acording to the internal config.
- Returns
- bool true on success, else string with errormessage
- Exceptions
-
Exception | on empty message, subject and address list |
Definition at line 143 of file email.class.php.
sets the message of the mail
- Parameters
-
- Returns
- bool true on success, else false
Definition at line 128 of file email.class.php.
sets the subject of the mail
- Parameters
-
string | $text | the subject message |
- Returns
- bool true on success, else false
Definition at line 113 of file email.class.php.
Field Documentation
the address list we are sending to. array of array where index0 is the address and index1 the name, needs to be not empty
Definition at line 34 of file email.class.php.
"smtp", the email sender programm. smtp means there is an external smtp server.
Definition at line 31 of file email.class.php.
the message of the email, needs to be not empty
Definition at line 33 of file email.class.php.
the method of sending emails. Actually only "groups", which means there is one email-address per group
Definition at line 29 of file email.class.php.
the subject of the email, needs to be not empty
Definition at line 35 of file email.class.php.
The documentation for this class was generated from the following file: