ILIAS
trunk Revision v11.0_alpha-1861-g09f3d197f78
|
Public Member Functions | |
__construct (private int $a_user_id, private ?ilMailAddressTypeFactory $mail_address_type_factory=null, private ilMailRfc822AddressParserFactory $mail_address_parser_factory=new ilMailRfc822AddressParserFactory(), private ?ilAppEventHandler $event_handler=null, private ?ilLogger $logger=null, private ?ilDBInterface $db=null, private ?ilLanguage $lng=null, private ?ilFileDataMail $mail_file_data=null, protected ?ilMailOptions $mail_options=null, private ?ilMailbox $mailbox=null, private ?ilMailMimeSenderFactory $sender_factory=null, private ?Closure $usr_id_by_login_callable=null, private ?AutoresponderService $auto_responder_service=null, private ?int $mail_admin_node_ref_id=null, private ?int $mail_obj_ref_id=null, private ?ilObjUser $actor=null, private ?ilMailTemplatePlaceholderResolver $placeholder_resolver=null, private ?ilMailTemplatePlaceholderToEmptyResolver $placeholder_to_empty_resolver=null, ?Conductor $legal_documents=null, ?MailSignatureService $signature_service=null,) | |
autoresponder () | |
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 (MailDeliveryData $mail_data) | |
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 | _getIliasMailerName () |
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 Attributes | |
array | $mail_data = [] |
Private Member Functions | |
isSystemMail () | |
readMailObjectReferenceId () | |
fetchMailData (?array $row) | |
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=[]) | |
replacePlaceholders (string $message, int $usrId=0) | |
replacePlaceholdersEmpty (string $message) | |
distributeMail (MailDeliveryData $mail_data) | |
sendMailWithReplacedPlaceholder (MailDeliveryData $mail_data, array $to_usr_ids) | |
sendMailWithReplacedEmptyPlaceholder (MailDeliveryData $mail_data, array $recipients,) | |
sendMailWithoutReplacedPlaceholder (MailDeliveryData $mail_data, array $to_usr_ids, array $cc_bcc_recipients) | |
sendChanneledMails (MailDeliveryData $mail_data, array $recipients, string $message) | |
delegateExternalEmails (string $subject, array $attachments, string $message, array $usrIdToExternalEmailAddressesMap) | |
getUserIds (array $recipients) | |
checkMail (string $to, string $cc, string $bcc, string $subject) | |
checkRecipients (string $recipients) | |
getSubjectSentFolderId () | |
saveInSentbox (array $attachment, string $to, string $cc, string $bcc, string $subject, string $message) | |
sendMimeMail (string $to, string $cc, string $bcc, string $subject, string $message, array $attachments) | |
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) | |
createRecipient (int $user_id) | |
Private Attributes | |
MailSignatureService | $signature_service |
string | $table_mail |
string | $table_mail_saved |
bool | $save_in_sentbox |
bool | $append_installation_signature = false |
bool | $append_user_signature = false |
string | $context_id = null |
array | $context_parameters = [] |
array | $mail_options_by_usr_id_map = [] |
array | $user_instances_by_id_map = [] |
int | $max_recipient_character_length = 998 |
readonly Conductor | $legal_documents |
Definition at line 31 of file class.ilMail.php.
ilMail::__construct | ( | private int | $a_user_id, |
private ?ilMailAddressTypeFactory | $mail_address_type_factory = null , |
||
private ilMailRfc822AddressParserFactory | $mail_address_parser_factory = new ilMailRfc822AddressParserFactory() , |
||
private ?ilAppEventHandler | $event_handler = null , |
||
private ?ilLogger | $logger = null , |
||
private ?ilDBInterface | $db = null , |
||
private ?ilLanguage | $lng = null , |
||
private ?ilFileDataMail | $mail_file_data = null , |
||
protected ?ilMailOptions | $mail_options = null , |
||
private ?ilMailbox | $mailbox = null , |
||
private ?ilMailMimeSenderFactory | $sender_factory = null , |
||
private ?Closure | $usr_id_by_login_callable = null , |
||
private ?AutoresponderService | $auto_responder_service = null , |
||
private ?int | $mail_admin_node_ref_id = null , |
||
private ?int | $mail_obj_ref_id = null , |
||
private ?ilObjUser | $actor = null , |
||
private ?ilMailTemplatePlaceholderResolver | $placeholder_resolver = null , |
||
private ?ilMailTemplatePlaceholderToEmptyResolver | $placeholder_to_empty_resolver = null , |
||
?Conductor | $legal_documents = null , |
||
?MailSignatureService | $signature_service = null |
||
) |
Definition at line 57 of file class.ilMail.php.
References $DIC, $lng, ilObjUser\_lookupId(), ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), null, readMailObjectReferenceId(), and setSaveInSentbox().
|
static |
Definition at line 1342 of file class.ilMail.php.
References $DIC, $lang, ilUtil\_getHttpPath(), ilLanguageFactory\_getLanguage(), and ILIAS_VERSION_NUMERIC.
Referenced by ilSystemNotification\compose(), ilUserCronCheckAccounts\run(), ilMailSummaryNotification\send(), ilECSObjectSettings\sendNewContentNotification(), ilRemoteObjectBase\sendNewContentNotification(), and ilECSAppEventListener\sendNotification().
|
static |
Definition at line 1359 of file class.ilMail.php.
References $DIC.
Referenced by ilMailFolderGUI\confirmDeleteMails(), ilPDMailBlockGUI\getListItemForData(), ILIAS\Mail\Folder\MailFolderTableUI\getSender(), ilMailFolderGUI\printMail(), ilMailSummaryNotification\send(), and ilMailTest\testGetIliasMailerName().
|
static |
Definition at line 1380 of file class.ilMail.php.
References $DIC.
Referenced by ilObjUserGUI\__sendProfileMail(), ilForumMailNotification\addLinkToMail(), ilSystemNotification\compose(), ilForumMailEventNotificationSender\createAttachmentLinkText(), ilTimingsCronReminder\fillObjectListForMailBody(), ilCronDeleteInactiveUserReminderMailNotification\initLanguage(), ilMailSummaryNotification\send(), ILIAS\Wiki\Notification\NotificationGUI\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ILIAS\User\Profile\ChangeMailMail\sendEmailToExistingAddress(), ILIAS\User\Profile\ChangeMailMail\sendEmailToNewEmailAddress(), ILIAS\LegalDocuments\ConsumerToolbox\Mail\sendGeneric(), ilAccountRegistrationMail\sendLanguageVariableBasedAccountMail(), ilWikiUtil\sendNotification(), and ilObjSurveyGUI\sendUserResultsMail().
ilMail::appendInstallationSignature | ( | ?bool | $a_flag = null | ) |
Definition at line 1370 of file class.ilMail.php.
References $append_installation_signature, and null.
Referenced by enqueue().
ilMail::autoresponder | ( | ) |
Definition at line 109 of file class.ilMail.php.
|
private |
Definition at line 864 of file class.ilMail.php.
References ilStr\strLen().
Referenced by enqueue().
|
private |
ilMailException |
Definition at line 890 of file class.ilMail.php.
References Vendor\Package\$e, and parseAddresses().
Referenced by validateRecipients().
ilMail::countMailsOfFolder | ( | int | $folderId | ) |
|
private |
Definition at line 1453 of file class.ilMail.php.
References getMailOptionsByUserId(), and getUserInstanceById().
Referenced by distributeMail(), sendMailWithoutReplacedPlaceholder(), and sendMailWithReplacedPlaceholder().
|
private |
string[] | $attachments |
array<int,string[]> | $usrIdToExternalEmailAddressesMap |
Definition at line 777 of file class.ilMail.php.
References sendMimeMail(), and ilStr\strLen().
Referenced by sendChanneledMails().
ilMail::deleteMails | ( | array | $mailIds | ) |
int[] | $mailIds |
Definition at line 382 of file class.ilMail.php.
References $id.
Referenced by deleteMailsOfFolder(), and sendMail().
ilMail::deleteMailsOfFolder | ( | int | $folderId | ) |
Definition at line 282 of file class.ilMail.php.
References deleteMails(), and getMailsOfFolder().
|
private |
Definition at line 598 of file class.ilMail.php.
References createRecipient(), MailDeliveryData\getBcc(), MailDeliveryData\getCc(), MailDeliveryData\getTo(), getUserIds(), MailDeliveryData\isUsePlaceholder(), ILIAS\Repository\logger(), sendMailWithoutReplacedPlaceholder(), sendMailWithReplacedEmptyPlaceholder(), and sendMailWithReplacedPlaceholder().
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_attachment |
Definition at line 973 of file class.ilMail.php.
References $DIC, 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 137 of file class.ilMail.php.
References parseAddresses().
|
private |
Definition at line 395 of file class.ilMail.php.
References ILIAS\Repository\int(), and null.
Referenced by getMail(), getMailsOfFolder(), getNextMail(), getPreviousMail(), and retrieveFromStage().
ilMail::formatLinebreakMessage | ( | string | $message | ) |
Definition at line 1448 of file class.ilMail.php.
References $message.
ilMail::formatNamesForOutput | ( | string | $recipients | ) |
Definition at line 169 of file class.ilMail.php.
References ilObjUser\_lookupId(), ilObjUser\_lookupPref(), getUserInstanceById(), and ILIAS\Repository\lng().
|
private |
Definition at line 1300 of file class.ilMail.php.
References parseAddresses().
Referenced by getCountRecipients().
|
private |
Definition at line 1314 of file class.ilMail.php.
References getCountRecipient().
Referenced by enqueue(), and sendMail().
|
private |
Definition at line 1327 of file class.ilMail.php.
References parseAddresses().
Referenced by sendMail().
ilMail::getMail | ( | int | $mailId | ) |
Definition at line 290 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getMailObjectReferenceId | ( | ) |
Definition at line 164 of file class.ilMail.php.
|
private |
Definition at line 1431 of file class.ilMail.php.
Referenced by createRecipient(), and sendChanneledMails().
ilMail::getMailsOfFolder | ( | int | $a_folder_id, |
array | $filter = [] |
||
) |
Definition at line 240 of file class.ilMail.php.
References $res, and fetchMailData().
Referenced by deleteMailsOfFolder(), and ilPDMailBlockGUI\getMails().
ilMail::getNewDraftId | ( | int | $folderId | ) |
Definition at line 445 of file class.ilMail.php.
ilMail::getNextMail | ( | int | $mailId | ) |
Definition at line 219 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getPreviousMail | ( | int | $mailId | ) |
Definition at line 198 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
|
static |
Definition at line 1386 of file class.ilMail.php.
References $DIC, $lang, ilObjUser\_lookupGender(), and ilObjUser\_lookupName().
Referenced by ilTestManScoringParticipantNotification\buildBody(), ilSystemNotification\compose(), ilForumMailNotification\createMail(), ilForumMailEventNotificationSender\createMailBodyText(), ilChatroom\getSessions(), ilUserCronCheckAccounts\run(), ilRegistrationMailNotification\send(), ILIAS\Portfolio\Notification\SharedNotification\send(), ilMailSummaryNotification\send(), ilLMMailNotification\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ilBuddySystemNotification\send(), ilSessionMembershipMailNotification\send(), ilLearningSequenceMembershipMailNotification\send(), ilIndividualAssessmentPrimitiveInternalNotificator\send(), ilCalendarMailNotification\send(), ilExerciseMailNotification\send(), ilCourseMembershipMailNotification\send(), ilGroupMembershipMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), ilExerciseMailNotification\sendExerciseNotification(), ilTestMailNotification\sendSimpleNotification(), and ilObjSurveyGUI\sendUserResultsMail().
ilMail::getSaveInSentbox | ( | ) |
Definition at line 154 of file class.ilMail.php.
References $save_in_sentbox.
Referenced by enqueue(), and sendMail().
|
private |
Definition at line 1175 of file class.ilMail.php.
References isSystemMail().
Referenced by saveInSentbox(), and sendInternalMail().
|
private |
string[] | $recipients |
Definition at line 846 of file class.ilMail.php.
References parseAddresses().
Referenced by distributeMail().
|
private |
Definition at line 1408 of file class.ilMail.php.
References null.
Referenced by createRecipient(), formatNamesForOutput(), and replacePlaceholders().
|
private |
Definition at line 132 of file class.ilMail.php.
References ANONYMOUS_USER_ID.
Referenced by enqueue(), getSubjectSentFolderId(), sendChanneledMails(), sendMail(), and sendMimeMail().
ilMail::markRead | ( | array | $mailIds | ) |
ilMail::markUnread | ( | array | $mailIds | ) |
ilMail::moveMailsToFolder | ( | array | $mailIds, |
int | $folderId | ||
) |
|
private |
Explode recipient string, allowed separators are ',' ';' ' '.
Definition at line 1276 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 = [] |
||
) |
string[] | $a_attachments |
Definition at line 917 of file class.ilMail.php.
References retrieveFromStage().
Referenced by retrieveFromStage().
|
private |
Definition at line 159 of file class.ilMail.php.
References ilMailGlobalServices\getMailObjectRefId().
Referenced by __construct().
|
private |
Definition at line 563 of file class.ilMail.php.
References $context, Vendor\Package\$e, $message, ilMailTemplateContextService\getTemplateContextById(), getUserInstanceById(), ILIAS\Repository\logger(), and null.
Referenced by sendInternalMail(), sendMail(), and sendMailWithReplacedPlaceholder().
|
private |
Definition at line 593 of file class.ilMail.php.
Referenced by sendMailWithReplacedEmptyPlaceholder().
ilMail::retrieveFromStage | ( | ) |
Definition at line 952 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 1259 of file class.ilMail.php.
|
private |
string[] | $attachment |
Definition at line 1188 of file class.ilMail.php.
References getSubjectSentFolderId(), and sendInternalMail().
Referenced by sendMail().
|
private |
Recipient[] | $recipients |
JsonException |
Definition at line 677 of file class.ilMail.php.
References $message, delegateExternalEmails(), MailDeliveryData\getAttachments(), MailDeliveryData\getCc(), MailDeliveryData\getInternalMailId(), getMailOptionsByUserId(), MailDeliveryData\getSubject(), MailDeliveryData\getTo(), isSystemMail(), ILIAS\Repository\logger(), and sendInternalMail().
Referenced by sendMailWithoutReplacedPlaceholder(), sendMailWithReplacedEmptyPlaceholder(), and sendMailWithReplacedPlaceholder().
|
private |
Definition at line 498 of file class.ilMail.php.
References $user_id, getSubjectSentFolderId(), and replacePlaceholders().
Referenced by saveInSentbox(), and sendChanneledMails().
ilMail::sendMail | ( | MailDeliveryData | $mail_data | ) |
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[] | $attachments |
Definition at line 1084 of file class.ilMail.php.
References deleteMails(), distributeMail(), MailDeliveryData\getAttachments(), MailDeliveryData\getBcc(), MailDeliveryData\getCc(), getCountRecipients(), getEmailRecipients(), MailDeliveryData\getMessage(), getSaveInSentbox(), MailDeliveryData\getSubject(), MailDeliveryData\getTo(), isSystemMail(), ILIAS\Repository\logger(), replacePlaceholders(), saveInSentbox(), sendMimeMail(), and MailDeliveryData\withInternalMailId().
Referenced by enqueue().
|
private |
Definition at line 656 of file class.ilMail.php.
References createRecipient(), MailDeliveryData\getMessage(), and sendChanneledMails().
Referenced by distributeMail().
|
private |
Definition at line 645 of file class.ilMail.php.
References MailDeliveryData\getMessage(), replacePlaceholdersEmpty(), and sendChanneledMails().
Referenced by distributeMail().
|
private |
Definition at line 630 of file class.ilMail.php.
References $user_id, createRecipient(), MailDeliveryData\getMessage(), replacePlaceholders(), and sendChanneledMails().
Referenced by distributeMail().
|
private |
string[] | $attachments |
Definition at line 1213 of file class.ilMail.php.
References isSystemMail().
Referenced by delegateExternalEmails(), and sendMail().
ilMail::setMailOptionsByUserIdMap | ( | array | $mailOptionsByUsrIdMap | ) |
ilMailOptions[] | $mailOptionsByUsrIdMap |
Definition at line 1443 of file class.ilMail.php.
ilMail::setSaveInSentbox | ( | bool | $saveInSentbox | ) |
Definition at line 149 of file class.ilMail.php.
Referenced by __construct().
ilMail::setUserInstanceById | ( | array | $userInstanceByIdMap | ) |
array<int,ilObjUser> | $userInstanceByIdMap |
Definition at line 1426 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 = [] |
||
) |
ilMail::validateRecipients | ( | string | $to, |
string | $cc, | ||
string | $bcc | ||
) |
Definition at line 1157 of file class.ilMail.php.
References Vendor\Package\$e, and checkRecipients().
Referenced by enqueue().
ilMail::withContextId | ( | string | $contextId | ) |
Definition at line 114 of file class.ilMail.php.
ilMail::withContextParameters | ( | array | $parameters | ) |
Definition at line 123 of file class.ilMail.php.
|
private |
Definition at line 43 of file class.ilMail.php.
Referenced by appendInstallationSignature().
|
private |
Definition at line 44 of file class.ilMail.php.
|
private |
Definition at line 46 of file class.ilMail.php.
|
private |
Definition at line 47 of file class.ilMail.php.
|
private |
Definition at line 55 of file class.ilMail.php.
|
protected |
Definition at line 41 of file class.ilMail.php.
Referenced by ilFormatMail\appendSearchResult(), getMail(), getNextMail(), getPreviousMail(), and retrieveFromStage().
|
private |
Definition at line 50 of file class.ilMail.php.
|
private |
Definition at line 54 of file class.ilMail.php.
|
private |
Definition at line 42 of file class.ilMail.php.
Referenced by getSaveInSentbox().
|
private |
Definition at line 36 of file class.ilMail.php.
|
private |
Definition at line 38 of file class.ilMail.php.
|
private |
Definition at line 39 of file class.ilMail.php.
int ilMail::$user_id |
Definition at line 37 of file class.ilMail.php.
Referenced by markRead(), markUnread(), moveMailsToFolder(), sendInternalMail(), and sendMailWithReplacedPlaceholder().
|
private |
Definition at line 53 of file class.ilMail.php.
const ilMail::ILIAS_HOST = 'ilias' |
Definition at line 33 of file class.ilMail.php.
Referenced by ilMailAddressTypeFactory\__construct(), ilUtil\is_email(), and ilRoleMailboxSearch\searchRoleIdsByAddressString().
const ilMail::PROP_CONTEXT_SUBJECT_PREFIX = 'subject_prefix' |