ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
__construct (int $a_user_id, ilMailAddressTypeFactory $mailAddressTypeFactory=null, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null, ilAppEventHandler $eventHandler=null, ilLogger $logger=null, ilDBInterface $db=null, ilLanguage $lng=null, ilFileDataMail $mailFileData=null, ilMailOptions $mailOptions=null, ilMailbox $mailBox=null, ilMailMimeSenderFactory $senderFactory=null, callable $usrIdByLoginCallable=null, int $mailAdminNodeRefId=null, ilObjUser $actor=null) | |
withContextId (string $contextId) | |
withContextParameters (array $parameters) | |
existsRecipient (string $newRecipient, string $existingRecipients) | |
setSaveInSentbox (bool $saveInSentbox) | |
getSaveInSentbox () | |
getMailObjectReferenceId () | |
formatNamesForOutput (string $recipients) | |
getPreviousMail (int $mailId) | |
getNextMail (int $mailId) | |
getMailsOfFolder (int $a_folder_id, array $filter=[]) | |
countMailsOfFolder (int $folderId) | |
deleteMailsOfFolder (int $folderId) | |
getMail (int $mailId) | |
markRead (array $mailIds) | |
markUnread (array $mailIds) | |
moveMailsToFolder (array $mailIds, int $folderId) | |
deleteMails (array $mailIds) | |
getNewDraftId (int $folderId) | |
updateDraft (int $a_folder_id, array $a_attachments, string $a_rcp_to, string $a_rcp_cc, string $a_rcp_bcc, string $a_m_subject, string $a_m_message, int $a_draft_id=0, bool $a_use_placeholders=false, ?string $a_tpl_context_id=null, array $a_tpl_context_params=[]) | |
persistToStage (int $a_user_id, array $a_attachments, string $a_rcp_to, string $a_rcp_cc, string $a_rcp_bcc, string $a_m_subject, string $a_m_message, bool $a_use_placeholders=false, ?string $a_tpl_context_id=null, ?array $a_tpl_ctx_params=[]) | |
retrieveFromStage () | |
enqueue (string $a_rcp_to, string $a_rcp_cc, string $a_rcp_bcc, string $a_m_subject, string $a_m_message, array $a_attachment, bool $a_use_placeholders=false) | |
Should be used to enqueue a 'mail'. More... | |
sendMail (string $to, string $cc, string $bcc, string $subject, string $message, array $attachments, bool $usePlaceholders) | |
This method is used to finally send internal messages and external emails To use the mail system as a consumer, please use ilMail::enqueue. More... | |
validateRecipients (string $to, string $cc, string $bcc) | |
saveAttachments (array $attachments) | |
appendInstallationSignature (bool $a_flag=null) | |
setUserInstanceById (array $userInstanceByIdMap) | |
setMailOptionsByUserIdMap (array $mailOptionsByUsrIdMap) | |
formatLinebreakMessage (string $message) | |
Static Public Member Functions | |
static | _getAutoGeneratedMessageString (ilLanguage $lang=null) |
static | _getInstallationSignature () |
static | getSalutation (int $a_usr_id, ?ilLanguage $a_language=null) |
Data Fields | |
const | ILIAS_HOST = 'ilias' |
const | PROP_CONTEXT_SUBJECT_PREFIX = 'subject_prefix' |
int | $user_id |
Protected Member Functions | |
isSystemMail () | |
readMailObjectReferenceId () | |
fetchMailData (?array $row) | |
replacePlaceholders (string $message, int $usrId=0, bool $replaceEmptyPlaceholders=true) | |
distributeMail (string $to, string $cc, string $bcc, string $subject, string $message, array $attachments, int $sentMailId, bool $usePlaceholders=false) | |
sendChanneledMails (string $to, string $cc, string $bcc, array $usrIds, string $subject, string $message, array $attachments, int $sentMailId, bool $usePlaceholders=false) | |
delegateExternalEmails (string $subject, string $message, array $attachments, bool $usePlaceholders, array $usrIdToExternalEmailAddressesMap, array $usrIdToMessageMap) | |
getUserIds (array $recipients) | |
checkMail (string $to, string $cc, string $bcc, string $subject) | |
checkRecipients (string $recipients) | |
saveInSentbox (array $attachment, string $to, string $cc, string $bcc, string $subject, string $message) | |
parseAddresses (string $addresses) | |
Explode recipient string, allowed separators are ',' ';' ' '. More... | |
getCountRecipient (string $recipients, bool $onlyExternalAddresses=true) | |
getCountRecipients (string $toRecipients, string $ccRecipients, string $bccRecipients, bool $onlyExternalAddresses=true) | |
getEmailRecipients (string $recipients) | |
getUserInstanceById (int $usrId) | |
getMailOptionsByUserId (int $usrId) | |
Protected Attributes | |
ilLanguage | $lng |
ilDBInterface | $db |
ilFileDataMail | $mfile |
ilMailOptions | $mail_options |
ilMailbox | $mailbox |
string | $table_mail |
string | $table_mail_saved |
array | $mail_data = [] |
int | $mail_obj_ref_id = null |
bool | $save_in_sentbox |
bool | $appendInstallationSignature = false |
string | $contextId = null |
array | $contextParameters = [] |
ilLogger | $logger |
array | $mailOptionsByUsrIdMap = [] |
array | $userInstancesByIdMap = [] |
$usrIdByLoginCallable | |
int | $maxRecipientCharacterLength = 998 |
ilMailMimeSenderFactory | $senderFactory |
ilObjUser | $actor |
Private Member Functions | |
sendInternalMail (int $folderId, int $senderUsrId, array $attachments, string $to, string $cc, string $bcc, string $status, string $subject, string $message, int $usrId=0, bool $usePlaceholders=false, ?string $templateContextId=null, array $templateContextParameters=[]) | |
getSubjectSentFolderId () | |
sendMimeMail (string $to, string $cc, string $bcc, string $subject, string $message, array $attachments) | |
Private Attributes | |
ilAppEventHandler | $eventHandler |
ilMailAddressTypeFactory | $mailAddressTypeFactory |
ilMailRfc822AddressParserFactory | $mailAddressParserFactory |
Definition at line 27 of file class.ilMail.php.
ilMail::__construct | ( | int | $a_user_id, |
ilMailAddressTypeFactory | $mailAddressTypeFactory = null , |
||
ilMailRfc822AddressParserFactory | $mailAddressParserFactory = null , |
||
ilAppEventHandler | $eventHandler = null , |
||
ilLogger | $logger = null , |
||
ilDBInterface | $db = null , |
||
ilLanguage | $lng = null , |
||
ilFileDataMail | $mailFileData = null , |
||
ilMailOptions | $mailOptions = null , |
||
ilMailbox | $mailBox = null , |
||
ilMailMimeSenderFactory | $senderFactory = null , |
||
callable | $usrIdByLoginCallable = null , |
||
int | $mailAdminNodeRefId = null , |
||
ilObjUser | $actor = null |
||
) |
Definition at line 59 of file class.ilMail.php.
References $DIC, $GLOBALS, $usrIdByLoginCallable, ilObjUser\_lookupId(), ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), readMailObjectReferenceId(), and setSaveInSentbox().
|
static |
Definition at line 1429 of file class.ilMail.php.
References $DIC, $GLOBALS, $lang, ilUtil\_getHttpPath(), ilLanguageFactory\_getLanguage(), ILIAS_VERSION_NUMERIC, and ilMailMimeSenderFactory\system().
Referenced by ilSystemNotification\compose(), ilUserCronCheckAccounts\hasFlexibleSchedule(), ilMailSummaryNotification\send(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), and ilECSAppEventListener\sendNotification().
|
static |
Definition at line 1468 of file class.ilMail.php.
References $DIC, ilUtil\_getHttpPath(), CLIENT_ID, and ILIAS_WEB_DIR.
Referenced by ilObjUserGUI\addAdminLocatorItems(), ilForumMailNotification\addLinkToMail(), ilSystemNotification\compose(), ilForumMailEventNotificationSender\createAttachmentLinkText(), ilTimingsCronReminder\fillObjectListForMailBody(), ilObjSurveyGUI\getUserResultsPlain(), ilCronDeleteInactiveUserReminderMailNotification\send(), ilMailSummaryNotification\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail(), and ilWikiUtil\sendNotification().
ilMail::appendInstallationSignature | ( | bool | $a_flag = null | ) |
bool | null | $a_flag |
Definition at line 1458 of file class.ilMail.php.
References $appendInstallationSignature.
Referenced by enqueue().
|
protected |
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject |
Definition at line 908 of file class.ilMail.php.
References $errors, and ilStr\strLen().
Referenced by enqueue().
|
protected |
string | $recipients |
ilMailException |
Definition at line 935 of file class.ilMail.php.
References Vendor\Package\$e, $errors, and parseAddresses().
Referenced by validateRecipients().
ilMail::countMailsOfFolder | ( | int | $folderId | ) |
|
protected |
string | $subject | |
string | $message | |
string[] | $attachments | |
bool | $usePlaceholders | |
array<int,string[]> | $usrIdToExternalEmailAddressesMap | |
array<int,string> | $usrIdToMessageMap |
Definition at line 794 of file class.ilMail.php.
References formatLinebreakMessage(), sendMimeMail(), and ilStr\strLen().
Referenced by sendChanneledMails().
ilMail::deleteMails | ( | array | $mailIds | ) |
int[] | $mailIds |
Definition at line 363 of file class.ilMail.php.
References $id.
Referenced by deleteMailsOfFolder(), and sendMail().
ilMail::deleteMailsOfFolder | ( | int | $folderId | ) |
Definition at line 269 of file class.ilMail.php.
References deleteMails(), and getMailsOfFolder().
|
protected |
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject | |
string | $message | |
string[] | $attachments | |
int | $sentMailId | |
bool | $usePlaceholders |
Definition at line 593 of file class.ilMail.php.
References getUserIds(), ILIAS\Repository\logger(), replacePlaceholders(), and sendChanneledMails().
Referenced by sendMail().
ilMail::enqueue | ( | string | $a_rcp_to, |
string | $a_rcp_cc, | ||
string | $a_rcp_bcc, | ||
string | $a_m_subject, | ||
string | $a_m_message, | ||
array | $a_attachment, | ||
bool | $a_use_placeholders = false |
||
) |
Should be used to enqueue a 'mail'.
A validation is executed before, errors are returned
string | $a_rcp_to | |
string | $a_rcp_cc | |
string | $a_rcp_bcc | |
string | $a_m_subject | |
string | $a_m_message | |
string[] | $a_attachment | |
bool | $a_use_placeholders |
Definition at line 1034 of file class.ilMail.php.
References $DIC, $errors, appendInstallationSignature(), checkMail(), ilContext\CONTEXT_CRON, getCountRecipients(), getSaveInSentbox(), ilContext\getType(), isSystemMail(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), sendMail(), and validateRecipients().
ilMail::existsRecipient | ( | string | $newRecipient, |
string | $existingRecipients | ||
) |
Definition at line 124 of file class.ilMail.php.
References parseAddresses().
|
protected |
array | null | $row |
Definition at line 380 of file class.ilMail.php.
References ILIAS\Repository\int().
Referenced by getMail(), getMailsOfFolder(), getNextMail(), getPreviousMail(), and retrieveFromStage().
ilMail::formatLinebreakMessage | ( | string | $message | ) |
Definition at line 1561 of file class.ilMail.php.
References $message.
Referenced by delegateExternalEmails(), sendInternalMail(), and sendMail().
ilMail::formatNamesForOutput | ( | string | $recipients | ) |
Definition at line 156 of file class.ilMail.php.
References ilObjUser\_lookupId(), ilObjUser\_lookupPref(), getUserInstanceById(), and ILIAS\Repository\lng().
|
protected |
Definition at line 1387 of file class.ilMail.php.
References parseAddresses().
Referenced by getCountRecipients().
|
protected |
Definition at line 1401 of file class.ilMail.php.
References getCountRecipient().
Referenced by enqueue(), and sendMail().
|
protected |
Definition at line 1414 of file class.ilMail.php.
References parseAddresses().
Referenced by sendMail().
ilMail::getMail | ( | int | $mailId | ) |
Definition at line 277 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getMailObjectReferenceId | ( | ) |
|
protected |
Definition at line 1544 of file class.ilMail.php.
Referenced by sendChanneledMails().
ilMail::getMailsOfFolder | ( | int | $a_folder_id, |
array | $filter = [] |
||
) |
Definition at line 227 of file class.ilMail.php.
References $query, $res, and fetchMailData().
Referenced by deleteMailsOfFolder(), and ilPDMailBlockGUI\getMails().
ilMail::getNewDraftId | ( | int | $folderId | ) |
Definition at line 430 of file class.ilMail.php.
ilMail::getNextMail | ( | int | $mailId | ) |
Definition at line 206 of file class.ilMail.php.
References $mail_data, $query, $res, and fetchMailData().
ilMail::getPreviousMail | ( | int | $mailId | ) |
Definition at line 185 of file class.ilMail.php.
References $mail_data, $query, $res, and fetchMailData().
|
static |
Definition at line 1499 of file class.ilMail.php.
References $DIC, $lang, $name, ilObjUser\_lookupGender(), and ilObjUser\_lookupName().
Referenced by ilTestManScoringParticipantNotification\buildBody(), ilSystemNotification\compose(), ilForumMailNotification\createMail(), ilForumMailEventNotificationSender\createMailBodyText(), ilObjSurveyGUI\getUserResultsPlain(), ilUserCronCheckAccounts\hasFlexibleSchedule(), ilChatroom\isOwnerOfPrivateRoom(), ilRegistrationMailNotification\send(), ilMailSummaryNotification\send(), ilLMMailNotification\send(), ilExerciseMailNotification\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ilSessionMembershipMailNotification\send(), ilBuddySystemNotification\send(), ilLearningSequenceMembershipMailNotification\send(), ilIndividualAssessmentPrimitiveInternalNotificator\send(), ilCalendarMailNotification\send(), ilGroupMembershipMailNotification\send(), ilCourseMembershipMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), and ilTestMailNotification\sendSimpleNotification().
ilMail::getSaveInSentbox | ( | ) |
Definition at line 141 of file class.ilMail.php.
References $save_in_sentbox.
Referenced by enqueue(), and sendMail().
|
private |
Definition at line 1255 of file class.ilMail.php.
References isSystemMail().
Referenced by saveInSentbox(), and sendInternalMail().
|
protected |
string[] | $recipients |
Definition at line 886 of file class.ilMail.php.
References parseAddresses().
Referenced by distributeMail().
|
protected |
Definition at line 1521 of file class.ilMail.php.
References Vendor\Package\$e.
Referenced by formatNamesForOutput(), replacePlaceholders(), and sendChanneledMails().
|
protected |
Definition at line 119 of file class.ilMail.php.
References ANONYMOUS_USER_ID.
Referenced by enqueue(), getSubjectSentFolderId(), sendChanneledMails(), and sendMail().
ilMail::markRead | ( | array | $mailIds | ) |
ilMail::markUnread | ( | array | $mailIds | ) |
ilMail::moveMailsToFolder | ( | array | $mailIds, |
int | $folderId | ||
) |
int[] | $mailIds | |
int | $folderId |
Definition at line 333 of file class.ilMail.php.
References $query.
|
protected |
Explode recipient string, allowed separators are ',' ';' ' '.
string | $addresses |
Definition at line 1363 of file class.ilMail.php.
References ILIAS\Repository\logger().
Referenced by checkRecipients(), existsRecipient(), getCountRecipient(), getEmailRecipients(), and getUserIds().
ilMail::persistToStage | ( | int | $a_user_id, |
array | $a_attachments, | ||
string | $a_rcp_to, | ||
string | $a_rcp_cc, | ||
string | $a_rcp_bcc, | ||
string | $a_m_subject, | ||
string | $a_m_message, | ||
bool | $a_use_placeholders = false , |
||
?string | $a_tpl_context_id = null , |
||
?array | $a_tpl_ctx_params = [] |
||
) |
int | $a_user_id | |
string[] | $a_attachments | |
string | $a_rcp_to | |
string | $a_rcp_cc | |
string | $a_rcp_bcc | |
string | $a_m_subject | |
string | $a_m_message | |
bool | $a_use_placeholders | |
string | null | $a_tpl_context_id | |
array | null | $a_tpl_ctx_params |
Definition at line 972 of file class.ilMail.php.
References retrieveFromStage().
Referenced by retrieveFromStage().
|
protected |
Definition at line 146 of file class.ilMail.php.
References ilMailGlobalServices\getMailObjectRefId().
Referenced by __construct().
|
protected |
Definition at line 560 of file class.ilMail.php.
References $context, Vendor\Package\$e, $message, ilMailTemplateContextService\getTemplateContextById(), getUserInstanceById(), and ILIAS\Repository\logger().
Referenced by distributeMail(), sendChanneledMails(), sendInternalMail(), and sendMail().
ilMail::retrieveFromStage | ( | ) |
Definition at line 1007 of file class.ilMail.php.
References $mail_data, $res, fetchMailData(), and persistToStage().
Referenced by ilObjUserFolderGUI\mailObject(), and persistToStage().
ilMail::saveAttachments | ( | array | $attachments | ) |
string[] | $attachments |
Definition at line 1345 of file class.ilMail.php.
|
protected |
string[] | $attachment | |
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject | |
string | $message |
Definition at line 1274 of file class.ilMail.php.
References getSubjectSentFolderId(), and sendInternalMail().
Referenced by sendMail().
|
protected |
string | $to | |
string | $cc | |
string | $bcc | |
int[] | $usrIds | |
string | $subject | |
string | $message | |
string[] | $attachments | |
int | $sentMailId | |
bool | $usePlaceholders |
Definition at line 671 of file class.ilMail.php.
References $mailbox, $message, delegateExternalEmails(), getMailOptionsByUserId(), getUserInstanceById(), ilMailOptions\INCOMING_BOTH, ilMailOptions\INCOMING_EMAIL, isSystemMail(), ILIAS\Repository\logger(), replacePlaceholders(), sendInternalMail(), and ilMailbox\setUsrId().
Referenced by distributeMail().
|
private |
Definition at line 494 of file class.ilMail.php.
References $user_id, formatLinebreakMessage(), getSubjectSentFolderId(), and replacePlaceholders().
Referenced by saveInSentbox(), and sendChanneledMails().
ilMail::sendMail | ( | string | $to, |
string | $cc, | ||
string | $bcc, | ||
string | $subject, | ||
string | $message, | ||
array | $attachments, | ||
bool | $usePlaceholders | ||
) |
This method is used to finally send internal messages and external emails To use the mail system as a consumer, please use ilMail::enqueue.
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject | |
string | $message | |
string[] | $attachments | |
bool | $usePlaceholders |
Definition at line 1145 of file class.ilMail.php.
References $errors, deleteMails(), distributeMail(), formatLinebreakMessage(), getCountRecipients(), getEmailRecipients(), getSaveInSentbox(), isSystemMail(), ILIAS\Repository\logger(), replacePlaceholders(), saveInSentbox(), and sendMimeMail().
Referenced by enqueue().
|
private |
string | $to | |
string | $cc | |
string | $bcc | |
string | $subject | |
string | $message | |
string[] | $attachments |
Definition at line 1304 of file class.ilMail.php.
Referenced by delegateExternalEmails(), and sendMail().
ilMail::setMailOptionsByUserIdMap | ( | array | $mailOptionsByUsrIdMap | ) |
ilMailOptions[] | $mailOptionsByUsrIdMap |
Definition at line 1556 of file class.ilMail.php.
References $mailOptionsByUsrIdMap.
ilMail::setSaveInSentbox | ( | bool | $saveInSentbox | ) |
Definition at line 136 of file class.ilMail.php.
Referenced by __construct().
ilMail::setUserInstanceById | ( | array | $userInstanceByIdMap | ) |
array<int,ilObjUser> | $userInstanceByIdMap |
Definition at line 1539 of file class.ilMail.php.
ilMail::updateDraft | ( | int | $a_folder_id, |
array | $a_attachments, | ||
string | $a_rcp_to, | ||
string | $a_rcp_cc, | ||
string | $a_rcp_bcc, | ||
string | $a_m_subject, | ||
string | $a_m_message, | ||
int | $a_draft_id = 0 , |
||
bool | $a_use_placeholders = false , |
||
?string | $a_tpl_context_id = null , |
||
array | $a_tpl_context_params = [] |
||
) |
int | $a_folder_id | |
string[] | $a_attachments | |
string | $a_rcp_to | |
string | $a_rcp_cc | |
string | $a_rcp_bcc | |
string | $a_m_subject | |
string | $a_m_message | |
int | $a_draft_id | |
bool | $a_use_placeholders | |
string | null | $a_tpl_context_id | |
array | $a_tpl_context_params |
Definition at line 457 of file class.ilMail.php.
ilMail::validateRecipients | ( | string | $to, |
string | $cc, | ||
string | $bcc | ||
) |
string | $to | |
string | $cc | |
string | $bcc |
Definition at line 1237 of file class.ilMail.php.
References Vendor\Package\$e, $errors, and checkRecipients().
Referenced by enqueue().
ilMail::withContextId | ( | string | $contextId | ) |
ilMail::withContextParameters | ( | array | $parameters | ) |
Definition at line 110 of file class.ilMail.php.
|
protected |
Definition at line 57 of file class.ilMail.php.
|
protected |
Definition at line 43 of file class.ilMail.php.
Referenced by appendInstallationSignature().
|
protected |
Definition at line 47 of file class.ilMail.php.
Referenced by withContextId().
|
protected |
Definition at line 48 of file class.ilMail.php.
|
protected |
Definition at line 32 of file class.ilMail.php.
|
private |
Definition at line 44 of file class.ilMail.php.
|
protected |
Definition at line 31 of file class.ilMail.php.
|
protected |
Definition at line 49 of file class.ilMail.php.
|
protected |
Definition at line 40 of file class.ilMail.php.
Referenced by ilFormatMail\appendSearchResult(), getMail(), getNextMail(), getPreviousMail(), and retrieveFromStage().
|
protected |
Definition at line 41 of file class.ilMail.php.
Referenced by getMailObjectReferenceId().
|
protected |
Definition at line 34 of file class.ilMail.php.
|
private |
Definition at line 46 of file class.ilMail.php.
|
private |
Definition at line 45 of file class.ilMail.php.
|
protected |
Definition at line 35 of file class.ilMail.php.
Referenced by sendChanneledMails().
|
protected |
Definition at line 51 of file class.ilMail.php.
Referenced by setMailOptionsByUserIdMap().
|
protected |
Definition at line 55 of file class.ilMail.php.
|
protected |
Definition at line 33 of file class.ilMail.php.
|
protected |
Definition at line 42 of file class.ilMail.php.
Referenced by getSaveInSentbox().
|
protected |
Definition at line 56 of file class.ilMail.php.
|
protected |
Definition at line 37 of file class.ilMail.php.
|
protected |
Definition at line 38 of file class.ilMail.php.
int ilMail::$user_id |
Definition at line 36 of file class.ilMail.php.
Referenced by sendInternalMail().
|
protected |
Definition at line 53 of file class.ilMail.php.
|
protected |
Definition at line 54 of file class.ilMail.php.
Referenced by __construct().
const ilMail::ILIAS_HOST = 'ilias' |
Definition at line 29 of file class.ilMail.php.
Referenced by ilMailAddressTypeFactory\__construct(), ilUtil\is_email(), and ilRoleMailboxSearch\searchRoleIdsByAddressString().
const ilMail::PROP_CONTEXT_SUBJECT_PREFIX = 'subject_prefix' |