ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ( $a_user_id, ilMailAddressTypeFactory $mailAddressTypeFactory=null, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null, \ilAppEventHandler $eventHandler=null) | |
withContextId (string $contextId) | |
withContextParameters (array $parameters) | |
__get ($name) | |
Magic interceptor method __get Used to include files / instantiate objects at runtime. More... | |
existsRecipient (string $newRecipient, string $existingRecipients) | |
enableSOAP ($a_status) | |
Define if external mails should be sent using SOAP client or not. More... | |
isSOAPEnabled () | |
setSaveInSentbox ($a_save_in_sentbox) | |
getSaveInSentbox () | |
getMailObjectReferenceId () | |
formatNamesForOutput ($a_recipients) | |
Prepends the fullname of each ILIAS login name (if user has a public profile) found in the passed string and brackets the ILIAS login name afterwards. More... | |
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 $mailIds, int $folderId) | |
deleteMails (array $mailIds) | |
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()) | |
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 public More... | |
getSavedData () | |
sendMail ($a_rcp_to, $a_rcp_cc, $a_rcp_bc, $a_m_subject, $a_m_message, $a_attachment, $a_type, $a_use_placeholders=0) | |
Should be used to send notifcations over the internal or external mail channel. More... | |
validateRecipients (string $to, string $cc, string $bcc) | |
saveAttachments ($a_attachments) | |
appendInstallationSignature ($a_flag=null) | |
Setter/Getter for appending the installation signarue. More... | |
formatLinebreakMessage ($a_message) | |
Static Public Member Functions | |
static | _getAutoGeneratedMessageString (ilLanguage $lang=null) |
Get auto generated info string. More... | |
static | _getInstallationSignature () |
static | getSubjectPrefix () |
Get text that will be prepended to auto generated mails. More... | |
static | getSalutation ($a_usr_id, ilLanguage $a_language=null) |
Data Fields | |
const | ILIAS_HOST = 'ilias' |
const | MAIL_SUBJECT_PREFIX = '[ILIAS]' |
$user_id | |
Protected Member Functions | |
isSystemMail () | |
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 (array $recipients) | |
checkMail (string $to, string $cc, string $bcc, string $subject) | |
checkRecipients (string $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 (string $recipients, $onlyExternalAddresses=true) | |
getCountRecipients (string $toRecipients, string $ccRecipients, string $bccRecipients, $onlyExternalAddresses=true) | |
getEmailRecipients (string $recipients) | |
Static Protected Member Functions | |
static | getCachedUserInstance ($a_usr_id) |
Protected Attributes | |
$lng | |
$db | |
$mfile | |
$mail_options | |
$mailbox | |
$table_mail | |
$table_mail_saved | |
$mail_data = array() | |
$mail_obj_ref_id | |
$save_in_sentbox | |
$soap_enabled = true | |
$appendInstallationSignature = false | |
$properties = array() | |
$contextId = null | |
$contextParameters = [] | |
Static Protected Attributes | |
static | $userInstances = array() |
Private Member Functions | |
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 private More... | |
Private Attributes | |
$eventHandler | |
$mailAddressTypeFactory | |
$mailAddressParserFactory | |
Definition at line 11 of file class.ilMail.php.
ilMail::__construct | ( | $a_user_id, | |
ilMailAddressTypeFactory | $mailAddressTypeFactory = null , |
||
ilMailRfc822AddressParserFactory | $mailAddressParserFactory = null , |
||
\ilAppEventHandler | $eventHandler = null |
||
) |
integer | $a_user_id | |
ilMailAddressTypeFactory | null | $mailAddressTypeFactory | |
ilMailRfc822AddressParserFactory | null | $mailAddressParserFactory | |
ilAppEventHandler | null | $eventHandler |
Definition at line 86 of file class.ilMail.php.
References $DIC, $eventHandler, $mailAddressParserFactory, $mailAddressTypeFactory, readMailObjectReferenceId(), and setSaveInSentbox().
ilMail::__get | ( | $name | ) |
Magic interceptor method __get Used to include files / instantiate objects at runtime.
string | $name | The name of the class property |
Definition at line 171 of file class.ilMail.php.
|
static |
Get auto generated info string.
ilLanguage | $lang |
Definition at line 1641 of file class.ilMail.php.
References $DIC, $GLOBALS, $lang, ilUtil\_getHttpPath(), and ilLanguageFactory\_getLanguage().
Referenced by ilMailSummaryNotification\__construct(), ilECSAppEventListener\_sendNotification(), ilSystemNotification\compose(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), and ilAuthContainerECS\sendNotification().
|
static |
Definition at line 1689 of file class.ilMail.php.
References $DIC, and ilUtil\_getHttpPath().
Referenced by ilRegistrationMimeMailNotification\__construct(), ilMailSummaryNotification\__construct(), ilForumMailNotification\addLinkToMail(), ilSystemNotification\compose(), ilTimingsCronReminder\fillObjectListForMailBody(), ilCronDeleteInactiveUserReminderMailNotification\send(), ilMailCronOrphanedMailsNotification\send(), ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail(), and ilObjSurveyGUI\sendUserResultsMail().
ilMail::appendInstallationSignature | ( | $a_flag = null | ) |
Setter/Getter for appending the installation signarue.
mixed | boolean or nothing |
Definition at line 1676 of file class.ilMail.php.
References $appendInstallationSignature.
Referenced by sendMail().
|
protected |
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject |
Definition at line 1146 of file class.ilMail.php.
References $errors.
Referenced by sendMail().
|
protected |
Check if recipients are valid.
string | $recipients |
Definition at line 1168 of file class.ilMail.php.
References $errors, and parseAddresses().
Referenced by validateRecipients().
ilMail::countMailsOfFolder | ( | $a_folder_id | ) |
int | $a_folder_id |
Definition at line 389 of file class.ilMail.php.
References $res.
ilMail::deleteMails | ( | array | $mailIds | ) |
int[] | $mailIds |
Definition at line 562 of file class.ilMail.php.
References $id.
Referenced by deleteMailsOfFolder(), and sendMail().
ilMail::deleteMailsOfFolder | ( | $a_folder_id | ) |
int | $a_folder_id | id of folder |
Definition at line 406 of file class.ilMail.php.
References $mail_data, deleteMails(), and getMailsOfFolder().
|
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 816 of file class.ilMail.php.
References $a_type, $email, $id, formatLinebreakMessage(), ilMailOptions\getExternalEmailsByUser(), ilLoggerFactory\getLogger(), getUserIds(), ilMailOptions\INCOMING_BOTH, ilMailOptions\INCOMING_EMAIL, replacePlaceholders(), sendInternalMail(), and ilStr\strLen().
Referenced by sendMail().
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 210 of file class.ilMail.php.
ilMail::existsRecipient | ( | string | $newRecipient, |
string | $existingRecipients | ||
) |
string | $newRecipient | |
string | $existingRecipients |
Definition at line 193 of file class.ilMail.php.
References $list, and parseAddresses().
|
protected |
array|null |
Definition at line 582 of file class.ilMail.php.
Referenced by getMail(), getMailsOfFolder(), getNextMail(), getPreviousMail(), and getSavedData().
ilMail::formatLinebreakMessage | ( | $a_message | ) |
Definition at line 1772 of file class.ilMail.php.
Referenced by distributeMail(), sendInternalMail(), and sendMail().
ilMail::formatNamesForOutput | ( | $a_recipients | ) |
Prepends the fullname of each ILIAS login name (if user has a public profile) found in the passed string and brackets the ILIAS login name afterwards.
string | $a_recipients | A string containing to, cc or bcc recipients |
Definition at line 272 of file class.ilMail.php.
References $DIC, $user, ilObjUser\_lookupId(), and ilObjUser\_lookupPref().
|
staticprotected |
int | $a_usr_id |
Definition at line 1759 of file class.ilMail.php.
|
protected |
string | $recipients | |
bool | $onlyExternalAddresses |
Definition at line 1588 of file class.ilMail.php.
References parseAddresses().
Referenced by getCountRecipients().
|
protected |
string | $toRecipients | |
string | $ccRecipients | |
$bccRecipients | ||
bool | $onlyExternalAddresses |
Definition at line 1605 of file class.ilMail.php.
References getCountRecipient().
Referenced by sendMail().
|
protected |
string | $recipients |
Definition at line 1622 of file class.ilMail.php.
References parseAddresses().
Referenced by sendMail().
ilMail::getMail | ( | $a_mail_id | ) |
int | $a_mail_id |
Definition at line 424 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getMailObjectReferenceId | ( | ) |
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 352 of file class.ilMail.php.
References Sabre\VObject\$output, $query, $res, $row, and fetchMailData().
Referenced by deleteMailsOfFolder(), ilPDSysMessageBlockGUI\getMails(), and ilPDMailBlockGUI\getMails().
ilMail::getNewDraftId | ( | $usrId, | |
$folderId | |||
) |
ilMail::getNextMail | ( | $a_mail_id | ) |
int | $a_mail_id |
Definition at line 328 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getPreviousMail | ( | $a_mail_id | ) |
int | $a_mail_id |
Definition at line 305 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
|
static |
int | $a_usr_id | |
$a_language | ilLanguage|null |
Definition at line 1733 of file class.ilMail.php.
References $DIC, $lang, $name, ilObjUser\_lookupGender(), and ilObjUser\_lookupName().
Referenced by ilMailSummaryNotification\__construct(), ilTestManScoringParticipantNotification\buildBody(), ilSystemNotification\compose(), ilForumMailNotification\createMail(), ilChatroom\isOwnerOfPrivateRoom(), ilRegistrationMailNotification\send(), ilMailCronOrphanedMailsNotification\send(), ilDiskQuotaSummaryNotification\send(), ilSessionMembershipMailNotification\send(), ilBuddySystemNotification\send(), ilIndividualAssessmentPrimitiveInternalNotificator\send(), ilLearningSequenceMembershipMailNotification\send(), ilLMMailNotification\send(), ilExerciseMailNotification\send(), ilCourseMembershipMailNotification\send(), ilGroupMembershipMailNotification\send(), ilCalendarMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), ilTestMailNotification\sendSimpleNotification(), and ilObjSurveyGUI\sendUserResultsMail().
ilMail::getSavedData | ( | ) |
Definition at line 1275 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
Referenced by ilObjUserFolderGUI\mailObject(), and savePostData().
ilMail::getSaveInSentbox | ( | ) |
Definition at line 244 of file class.ilMail.php.
References $save_in_sentbox.
Referenced by sendMail().
|
static |
Get text that will be prepended to auto generated mails.
Definition at line 1716 of file class.ilMail.php.
References $DIC.
Referenced by ilMimeMail\Subject().
|
protected |
string[] | $recipients |
Definition at line 1124 of file class.ilMail.php.
References parseAddresses().
Referenced by distributeMail().
ilMail::isSOAPEnabled | ( | ) |
Definition at line 218 of file class.ilMail.php.
References $DIC, $soap_enabled, ilContext\CONTEXT_CRON, and ilContext\getType().
Referenced by saveInSentbox().
|
protected |
Definition at line 160 of file class.ilMail.php.
Referenced by sendMail().
ilMail::markRead | ( | array | $a_mail_ids | ) |
array | $a_mail_ids |
Definition at line 443 of file class.ilMail.php.
References $data, $in, and $query.
ilMail::markUnread | ( | array | $a_mail_ids | ) |
array | $a_mail_ids |
Definition at line 479 of file class.ilMail.php.
References $data, $in, and $query.
ilMail::moveMailsToFolder | ( | array | $mailIds, |
int | $folderId | ||
) |
int[] | $mailIds | |
int | $folderId |
Definition at line 516 of file class.ilMail.php.
References $in, $query, and $values.
|
protected |
Explode recipient string, allowed separators are ',' ';' ' ' Returns an array with recipient ilMailAddress instances.
string | $addresses |
Definition at line 1559 of file class.ilMail.php.
References $parser, and ilLoggerFactory\getLogger().
Referenced by checkRecipients(), existsRecipient(), getCountRecipient(), getEmailRecipients(), and getUserIds().
|
protected |
Read and set the mail object ref id (administration node)
Definition at line 252 of file class.ilMail.php.
References ilMailGlobalServices\getMailObjectRefId().
Referenced by __construct().
|
protected |
string | $a_message | |
int | $a_user_id | |
boolean | $replace_empty |
Definition at line 783 of file class.ilMail.php.
References $context, $user, ilLoggerFactory\getLogger(), and ilMailTemplateContextService\getTemplateContextById().
Referenced by distributeMail(), sendInternalMail(), and sendMail().
ilMail::saveAttachments | ( | $a_attachments | ) |
array | $a_attachments | An array of attachments |
Definition at line 1538 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 | |
array | $a_type | |
string | $a_m_subject | |
string | $a_m_message |
Definition at line 1439 of file class.ilMail.php.
References $_COOKIE, $a_type, $GLOBALS, $user_id, isSOAPEnabled(), and sendInternalMail().
Referenced by sendMail().
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 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 1208 of file class.ilMail.php.
References getSavedData().
Referenced by ilObjUserFolderGUI\mailObject().
|
private |
save mail in folder 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 | |
array | $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 674 of file class.ilMail.php.
References $user_id, formatLinebreakMessage(), and replacePlaceholders().
Referenced by distributeMail(), and saveInSentbox().
ilMail::sendMail | ( | $a_rcp_to, | |
$a_rcp_cc, | |||
$a_rcp_bc, | |||
$a_m_subject, | |||
$a_m_message, | |||
$a_attachment, | |||
$a_type, | |||
$a_use_placeholders = 0 |
|||
) |
Should be used to send notifcations over the internal or external mail channel.
string | $a_rcp_to | |
string | $a_rcp_cc | |
string | $a_rcp_bc | |
string | $a_m_subject | |
string | $a_m_message | |
array | $a_attachment | |
array | $a_type | (normal and/or system and/or email) |
bool | int | $a_use_placeholders |
Definition at line 1300 of file class.ilMail.php.
References $a_type, $DIC, $errors, appendInstallationSignature(), checkMail(), deleteMails(), distributeMail(), formatLinebreakMessage(), getCountRecipients(), getEmailRecipients(), ilLoggerFactory\getLogger(), getSaveInSentbox(), isSystemMail(), replacePlaceholders(), saveInSentbox(), and validateRecipients().
ilMail::setSaveInSentbox | ( | $a_save_in_sentbox | ) |
bool | $a_save_in_sentbox |
Definition at line 236 of file class.ilMail.php.
Referenced by __construct(), and ilSoapUtils\distributeMails().
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.
ilMail::validateRecipients | ( | string | $to, |
string | $cc, | ||
string | $bcc | ||
) |
string | $to | |
string | $cc | |
string | $bcc |
Definition at line 1410 of file class.ilMail.php.
References $errors, and checkRecipients().
Referenced by sendMail().
ilMail::withContextId | ( | string | $contextId | ) |
string | $contextId |
Definition at line 135 of file class.ilMail.php.
References $contextId.
ilMail::withContextParameters | ( | array | $parameters | ) |
|
protected |
Definition at line 52 of file class.ilMail.php.
Referenced by appendInstallationSignature().
|
protected |
Definition at line 73 of file class.ilMail.php.
Referenced by withContextId().
|
protected |
Definition at line 78 of file class.ilMail.php.
|
protected |
Definition at line 22 of file class.ilMail.php.
|
private |
Definition at line 55 of file class.ilMail.php.
Referenced by __construct().
|
protected |
Definition at line 19 of file class.ilMail.php.
|
protected |
Definition at line 43 of file class.ilMail.php.
Referenced by ilFormatMail\appendSearchResult(), deleteMailsOfFolder(), getMail(), getNextMail(), getPreviousMail(), and getSavedData().
|
protected |
Definition at line 46 of file class.ilMail.php.
Referenced by getMailObjectReferenceId().
|
protected |
Definition at line 28 of file class.ilMail.php.
|
private |
Definition at line 70 of file class.ilMail.php.
Referenced by __construct().
|
private |
Definition at line 67 of file class.ilMail.php.
Referenced by __construct().
|
protected |
Definition at line 31 of file class.ilMail.php.
|
protected |
Definition at line 25 of file class.ilMail.php.
|
protected |
Definition at line 61 of file class.ilMail.php.
|
protected |
Definition at line 49 of file class.ilMail.php.
Referenced by getSaveInSentbox().
|
protected |
Definition at line 51 of file class.ilMail.php.
Referenced by isSOAPEnabled().
|
protected |
Definition at line 37 of file class.ilMail.php.
|
protected |
Definition at line 40 of file class.ilMail.php.
ilMail::$user_id |
Definition at line 34 of file class.ilMail.php.
Referenced by saveInSentbox(), and sendInternalMail().
|
staticprotected |
Definition at line 64 of file class.ilMail.php.
const ilMail::ILIAS_HOST = 'ilias' |
Definition at line 14 of file class.ilMail.php.
Referenced by ilMailAddressTypeFactory\__construct(), ilUtil\is_email(), and ilRoleMailboxSearch\searchRoleIdsByAddressString().
const ilMail::MAIL_SUBJECT_PREFIX = '[ILIAS]' |
Definition at line 16 of file class.ilMail.php.
Referenced by ilObjMailGUI\populateExternalSettingsForm().