|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
This class handles base functions for mail handling. More...
Inheritance diagram for ilMail:
Collaboration diagram for ilMail:Public Member Functions | |
| existsRecipient ($a_recipient, $a_existing_recipients) | |
| enableSOAP ($a_status) | |
| Define if external mails should be sent using SOAP client or not. More... | |
| setSaveInSentbox ($a_save_in_sentbox) | |
| getSaveInSentbox () | |
| getMailObjectReferenceId () | |
| getPreviousMail ($a_mail_id) | |
| getNextMail ($a_mail_id) | |
| getMailsOfFolder ($a_folder_id, $filter=array()) | |
| countMailsOfFolder ($a_folder_id) | |
| deleteMailsOfFolder ($a_folder_id) | |
| getMail ($a_mail_id) | |
| markRead (array $a_mail_ids) | |
| markUnread (array $a_mail_ids) | |
| moveMailsToFolder (array $a_mail_ids, $a_folder_id) | |
| deleteMails (array $a_mail_ids) | |
| getNewDraftId ($usrId, $folderId) | |
| updateDraft ( $a_folder_id, $a_attachments, $a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_m_type, $a_m_email, $a_m_subject, $a_m_message, $a_draft_id=0, $a_use_placeholders=0, $a_tpl_context_id=null, $a_tpl_context_params=array()) | |
| sendInternalMail ( $a_folder_id, $a_sender_id, $a_attachments, $a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_status, $a_m_type, $a_m_email, $a_m_subject, $a_m_message, $a_user_id=0, $a_use_placeholders=0, $a_tpl_context_id=null, $a_tpl_context_params=array()) | |
| save mail in folder @access private More... | |
| savePostData ( $a_user_id, $a_attachments, $a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_m_type, $a_m_email, $a_m_subject, $a_m_message, $a_use_placeholders, $a_tpl_context_id=null, $a_tpl_ctx_params=array()) | |
| save post data in table @access public More... | |
| getSavedData () | |
| validateRecipients ($a_rcp_to, $a_rcp_cc, $a_rcp_bc) | |
| sendMimeMail ($a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_m_subject, $a_m_message, $a_attachments, $a_no_soap=false) | |
| Send mime mail using class.ilMimeMail.php. More... | |
| saveAttachments ($a_attachments) | |
| appendInstallationSignature ($a_flag=null) | |
| Setter/Getter for appending the installation signarue. More... | |
Data Fields | |
| const | ILIAS_HOST = 'ilias' |
| $user_id | |
Protected Member Functions | |
| readMailObjectReferenceId () | |
| Read and set the mail object ref id (administration node) More... | |
| fetchMailData ($a_row) | |
| replacePlaceholders ($a_message, $a_user_id=0, $replace_empty=true) | |
| distributeMail ($a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_subject, $a_message, $a_attachments, $sent_mail_id, $a_type, $a_action, $a_use_placeholders=0) | |
| getUserIds ($a_recipients) | |
| checkMail ($a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_m_subject, $a_m_message, $a_type) | |
| checkRecipients ($a_recipients) | |
| Check if recipients are valid. More... | |
| saveInSentbox ($a_attachment, $a_rcp_to, $a_rcp_cc, $a_rcp_bcc, $a_type, $a_m_subject, $a_m_message) | |
| Stores a message in the sent bod of the current user. More... | |
| parseAddresses ($addresses) | |
| Explode recipient string, allowed separators are ',' ';' ' ' Returns an array with recipient ilMailAddress instances. More... | |
| getCountRecipient ($a_recipients, $a_only_email=true) | |
| getCountRecipients ($a_to, $a_cc, $a_bcc, $a_only_email=true) | |
| getEmailRecipients ($a_recipients) | |
Static Protected Member Functions | |
| static | getCachedUserInstance ($a_usr_id) |
Protected Attributes | |
| $lng | |
| $db | |
| $mfile | |
| $mail_options | |
| $table_mail | |
| $table_mail_saved | |
| $mail_data = array() | |
| $mail_obj_ref_id | |
| $save_in_sentbox | |
| $soap_enabled = true | |
| $mail_to_global_roles = 0 | |
| $appendInstallationSignature = false | |
| $properties = array() | |
Static Protected Attributes | |
| static | $userInstances = array() |
This class handles base functions for mail handling.
ILIAS is enabled to use standards compliant email addresses. The class supports RFC 822 compliant address lists as specified in http://www.ietf.org/rfc/rfc0822.txt
Examples: The following mailbox addresses work for sending an email to the user with the login john.doe and email address jd@ma.nosp@m.il.c.nosp@m.om. The user is member of the course "French Course". The member role of the course object has the name "il_crs_member_998" and the object ID "1000".
john.doe John Doe <john.doe> john.doe@ilias #member@[French Course] #il_crs_member_998 #il_role_1000 jd@ma.nosp@m.il.c.nosp@m.om John Doe jd@ma.nosp@m.il.c.nosp@m.om
Syntax Rules: The following excerpt from chapter 6.1 "Syntax" of RFC 822 is relevant for the semantics described below:
addr-spec = local-part [ "@", domain ]
Semantics: User account mailbox address:
Role object mailbox address:
Definition at line 66 of file class.ilMail.php.
| ilMail::appendInstallationSignature | ( | $a_flag = null | ) |
Setter/Getter for appending the installation signarue.
| mixed | boolean or nothing |
Definition at line 1629 of file class.ilMail.php.
References $appendInstallationSignature, and appendInstallationSignature().
Referenced by appendInstallationSignature().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| string | $a_m_subject | |
| string | $a_m_message | |
| string | $a_type |
Definition at line 989 of file class.ilMail.php.
References $errors.
|
protected |
Check if recipients are valid.
| string | $a_recipients | string with login names or group names (start with #) |
| string | $a_type |
| ilMailException |
Definition at line 1013 of file class.ilMail.php.
References $errors, ilMailAddressTypeFactory\getByPrefix(), and parseAddresses().
Referenced by validateRecipients().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::countMailsOfFolder | ( | $a_folder_id | ) |
| int | $a_folder_id |
Definition at line 400 of file class.ilMail.php.
References $res.
| ilMail::deleteMails | ( | array | $a_mail_ids | ) |
| array | $a_mail_ids |
Definition at line 561 of file class.ilMail.php.
Referenced by deleteMailsOfFolder().
Here is the caller graph for this function:| ilMail::deleteMailsOfFolder | ( | $a_folder_id | ) |
| int | $a_folder_id | id of folder |
Definition at line 415 of file class.ilMail.php.
References $mail_data, deleteMails(), and getMailsOfFolder().
Here is the call graph for this function:
|
protected |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| string | $a_subject | |
| string | $a_message | |
| array | $a_attachments | |
| integer | $sent_mail_id | |
| array | $a_type | |
| array | $a_action | |
| array | int | $a_use_placeholders |
Definition at line 764 of file class.ilMail.php.
References $a_type, getCachedUserInstance(), ilLoggerFactory\getLogger(), getUserIds(), replacePlaceholders(), sendInternalMail(), sendMimeMail(), and sprintf.
Here is the call graph for this function:| ilMail::enableSOAP | ( | $a_status | ) |
Define if external mails should be sent using SOAP client or not.
The autogenerated mails in new user registration sets this value to false, since there is no valid session.
| bool | $a_status |
Definition at line 213 of file class.ilMail.php.
| ilMail::existsRecipient | ( | $a_recipient, | |
| $a_existing_recipients | |||
| ) |
| string | $a_recipient | |
| string | $a_existing_recipients |
Definition at line 177 of file class.ilMail.php.
References parseAddresses().
Here is the call graph for this function:
|
protected |
| array|null |
Definition at line 581 of file class.ilMail.php.
Referenced by getMail(), getMailsOfFolder(), getNextMail(), getPreviousMail(), and getSavedData().
Here is the caller graph for this function:
|
staticprotected |
| int | $a_usr_id |
Definition at line 1714 of file class.ilMail.php.
Referenced by distributeMail(), and replacePlaceholders().
Here is the caller graph for this function:
|
protected |
| string | $a_recipients | |
| bool | $a_only_email |
Definition at line 1501 of file class.ilMail.php.
References $counter, ilObjUser\_lookupId(), and parseAddresses().
Referenced by getCountRecipients().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| string | $a_to | |
| string | $a_cc | |
| string | $a_bcc | |
| bool | $a_only_email |
Definition at line 1540 of file class.ilMail.php.
References getCountRecipient().
Here is the call graph for this function:
|
protected |
| string | $a_recipients |
Definition at line 1552 of file class.ilMail.php.
References ilObjUser\_lookupId(), and parseAddresses().
Here is the call graph for this function:| ilMail::getMail | ( | $a_mail_id | ) |
| int | $a_mail_id |
Definition at line 435 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
Here is the call graph for this function:| ilMail::getMailObjectReferenceId | ( | ) |
Definition at line 267 of file class.ilMail.php.
References $mail_obj_ref_id.
| ilMail::getMailsOfFolder | ( | $a_folder_id, | |
$filter = array() |
|||
| ) |
| int | $a_folder_id | The id of the folder |
| array | $filter | An optional filter array |
Definition at line 361 of file class.ilMail.php.
References $output, $query, $res, $row, and fetchMailData().
Referenced by deleteMailsOfFolder().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::getNewDraftId | ( | $usrId, | |
| $folderId | |||
| ) |
| int | $usrId | |
| int | $folderId |
Definition at line 600 of file class.ilMail.php.
| ilMail::getNextMail | ( | $a_mail_id | ) |
| int | $a_mail_id |
Definition at line 338 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
Here is the call graph for this function:| ilMail::getPreviousMail | ( | $a_mail_id | ) |
| int | $a_mail_id |
Definition at line 316 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
Here is the call graph for this function:| ilMail::getSavedData | ( | ) |
Definition at line 1099 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
Referenced by savePostData().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::getSaveInSentbox | ( | ) |
Definition at line 250 of file class.ilMail.php.
References $save_in_sentbox.
|
protected |
| string | $a_recipients | recipients seperated by ',' |
Definition at line 965 of file class.ilMail.php.
References ilMailAddressTypeFactory\getByPrefix(), and parseAddresses().
Referenced by distributeMail().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::markRead | ( | array | $a_mail_ids | ) |
| array | $a_mail_ids |
Definition at line 452 of file class.ilMail.php.
| ilMail::markUnread | ( | array | $a_mail_ids | ) |
| array | $a_mail_ids |
Definition at line 488 of file class.ilMail.php.
| ilMail::moveMailsToFolder | ( | array | $a_mail_ids, |
| $a_folder_id | |||
| ) |
| array | $a_mail_ids | |
| int | $a_folder_id |
Definition at line 525 of file class.ilMail.php.
|
protected |
Explode recipient string, allowed separators are ',' ';' ' ' Returns an array with recipient ilMailAddress instances.
| string | $addresses |
Definition at line 1471 of file class.ilMail.php.
References $parser, ilMailAddress\getHost(), ilLoggerFactory\getLogger(), ilMailAddress\getMailbox(), ilMailRfc822AddressParserFactory\getParser(), and sprintf.
Referenced by checkRecipients(), existsRecipient(), getCountRecipient(), getEmailRecipients(), and getUserIds().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Read and set the mail object ref id (administration node)
Definition at line 258 of file class.ilMail.php.
References ilMailGlobalServices\getMailObjectRefId().
Here is the call graph for this function:
|
protected |
| string | $a_message | |
| int | $a_user_id | |
| boolean | $replace_empty |
Definition at line 719 of file class.ilMail.php.
References getCachedUserInstance(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilLoggerFactory\getLogger(), and ilMailTemplateService\getTemplateContextById().
Referenced by distributeMail(), and sendInternalMail().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::saveAttachments | ( | $a_attachments | ) |
| array | $a_attachments | An array of attachments |
Definition at line 1451 of file class.ilMail.php.
|
protected |
Stores a message in the sent bod of the current user.
| array | $a_attachment | |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| string | $a_type | |
| string | $a_m_subject | |
| string | $a_m_message |
Definition at line 1280 of file class.ilMail.php.
References $a_type, and sendInternalMail().
Here is the call graph for this function:| ilMail::savePostData | ( | $a_user_id, | |
| $a_attachments, | |||
| $a_rcp_to, | |||
| $a_rcp_cc, | |||
| $a_rcp_bcc, | |||
| $a_m_type, | |||
| $a_m_email, | |||
| $a_m_subject, | |||
| $a_m_message, | |||
| $a_use_placeholders, | |||
$a_tpl_context_id = null, |
|||
$a_tpl_ctx_params = array() |
|||
| ) |
save post data in table @access public
| int | $a_user_id | |
| array | $a_attachments | |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| array | $a_m_type | |
| int | $a_m_email | |
| string | $a_m_subject | |
| string | $a_m_message | |
| int | $a_use_placeholders | |
| string | null | $a_tpl_context_id | |
| array | null | $a_tpl_ctx_params |
Definition at line 1056 of file class.ilMail.php.
References getSavedData().
Here is the call graph for this function:| ilMail::sendInternalMail | ( | $a_folder_id, | |
| $a_sender_id, | |||
| $a_attachments, | |||
| $a_rcp_to, | |||
| $a_rcp_cc, | |||
| $a_rcp_bcc, | |||
| $a_status, | |||
| $a_m_type, | |||
| $a_m_email, | |||
| $a_m_subject, | |||
| $a_m_message, | |||
$a_user_id = 0, |
|||
$a_use_placeholders = 0, |
|||
$a_tpl_context_id = null, |
|||
$a_tpl_context_params = array() |
|||
| ) |
save mail in folder @access private
| integer | $a_folder_id | |
| integer | $a_sender_id | |
| array | $a_attachments | |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| string | $a_status | |
| string | $a_m_type | |
| integer | $a_m_email | |
| string | $a_m_subject | |
| string | $a_m_message | |
| integer | $a_user_id | |
| integer | $a_use_placeholders | |
| string | null | $a_tpl_context_id | |
| array | null | $a_tpl_context_params |
Definition at line 664 of file class.ilMail.php.
References $user_id, date, and replacePlaceholders().
Referenced by distributeMail(), and saveInSentbox().
Here is the call graph for this function:
Here is the caller graph for this function:| ilMail::sendMimeMail | ( | $a_rcp_to, | |
| $a_rcp_cc, | |||
| $a_rcp_bcc, | |||
| $a_m_subject, | |||
| $a_m_message, | |||
| $a_attachments, | |||
$a_no_soap = false |
|||
| ) |
Send mime mail using class.ilMimeMail.php.
All external mails are send to SOAP::sendMail (if enabled) starting a kind of background process
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bcc | |
| string | $a_m_subject | |
| string | $a_m_message | |
| array | $a_attachments | |
| bool | $a_no_soap |
Definition at line 1369 of file class.ilMail.php.
References $_COOKIE.
Referenced by distributeMail().
Here is the caller graph for this function:| ilMail::setSaveInSentbox | ( | $a_save_in_sentbox | ) |
| bool | $a_save_in_sentbox |
Definition at line 242 of file class.ilMail.php.
| ilMail::updateDraft | ( | $a_folder_id, | |
| $a_attachments, | |||
| $a_rcp_to, | |||
| $a_rcp_cc, | |||
| $a_rcp_bcc, | |||
| $a_m_type, | |||
| $a_m_email, | |||
| $a_m_subject, | |||
| $a_m_message, | |||
$a_draft_id = 0, |
|||
$a_use_placeholders = 0, |
|||
$a_tpl_context_id = null, |
|||
$a_tpl_context_params = array() |
|||
| ) |
Definition at line 613 of file class.ilMail.php.
References date.
| ilMail::validateRecipients | ( | $a_rcp_to, | |
| $a_rcp_cc, | |||
| $a_rcp_bc | |||
| ) |
| string | $a_rcp_to | |
| string | $a_rcp_cc | |
| string | $a_rcp_bc |
Definition at line 1247 of file class.ilMail.php.
References $errors, and checkRecipients().
Here is the call graph for this function:
|
protected |
Definition at line 103 of file class.ilMail.php.
Referenced by appendInstallationSignature().
|
protected |
Definition at line 75 of file class.ilMail.php.
|
protected |
Definition at line 72 of file class.ilMail.php.
|
protected |
Definition at line 93 of file class.ilMail.php.
Referenced by ilFormatMail\appendSearchResult(), deleteMailsOfFolder(), getMail(), getNextMail(), getPreviousMail(), and getSavedData().
|
protected |
Definition at line 96 of file class.ilMail.php.
Referenced by getMailObjectReferenceId().
|
protected |
Definition at line 81 of file class.ilMail.php.
|
protected |
Definition at line 102 of file class.ilMail.php.
|
protected |
Definition at line 78 of file class.ilMail.php.
|
protected |
Definition at line 109 of file class.ilMail.php.
|
protected |
Definition at line 99 of file class.ilMail.php.
Referenced by getSaveInSentbox().
|
protected |
Definition at line 101 of file class.ilMail.php.
|
protected |
Definition at line 87 of file class.ilMail.php.
|
protected |
Definition at line 90 of file class.ilMail.php.
| ilMail::$user_id |
Definition at line 84 of file class.ilMail.php.
Referenced by sendInternalMail().
|
staticprotected |
Definition at line 112 of file class.ilMail.php.
| const ilMail::ILIAS_HOST = 'ilias' |
Definition at line 69 of file class.ilMail.php.
Referenced by ilMailAddressTypeFactory\getByPrefix(), ilUtil\is_email(), ilMailImapRfc822AddressParser\parseAddressString(), ilMailPearRfc822WrapperAddressParser\parseAddressString(), and ilMailLoginOrEmailAddressAddressType\resolve().