ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
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 $context_id) | |
withContextParameters (array $parameters) | |
existsRecipient (string $new_recipient, string $existing_recipients) | |
setSaveInSentbox (bool $save_in_sentbox) | |
getSaveInSentbox () | |
getMailObjectReferenceId () | |
formatNamesForOutput (string $recipients) | |
getPreviousMail (int $mail_id) | |
getNextMail (int $mail_id) | |
getMailsOfFolder (int $a_folder_id, array $filter=[]) | |
countMailsOfFolder (int $folder_id) | |
deleteMailsOfFolder (int $folder_id) | |
getMail (int $mail_id) | |
markRead (array $mail_ids) | |
markUnread (array $mail_ids) | |
moveMailsToFolder (array $mail_ids, int $folder_id) | |
deleteMails (array $mail_ids) | |
getNewDraftId (int $folder_id) | |
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 $user_instances_by_id_map) | |
setMailOptionsByUserIdMap (array $mail_options_by_usr_id_map) | |
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 string | ILIAS_HOST = 'ilias' |
const string | PROP_CONTEXT_SUBJECT_PREFIX = 'subject_prefix' |
int | $user_id |
Protected Attributes | |
array | $mail_data = [] |
Private Member Functions | |
isSystemMail () | |
readMailObjectReferenceId () | |
fetchMailData (?array $row) | |
sendInternalMail (int $folder_id, int $sender_usr_id, array $attachments, string $to, string $cc, string $bcc, string $status, string $subject, string $message, int $usr_id=0, bool $use_placeholders=false, ?string $template_contenxt_id=null, array $template_context_parameters=[]) | |
replacePlaceholders (string $message, int $usr_id=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 $usr_id_to_external_email_addresses_map) | |
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 $only_external_addresses=true) | |
getCountRecipients (string $to_recipients, string $cc_recipients, string $bcc_recipients, bool $only_external_addresses=true) | |
getEmailRecipients (string $recipients) | |
getUserInstanceById (int $usr_id) | |
getMailOptionsByUserId (int $usr_id) | |
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 28 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 54 of file class.ilMail.php.
References $DIC, $legal_documents, $lng, $signature_service, ilObjUser\_lookupId(), ilLoggerFactory\getLogger(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), readMailObjectReferenceId(), and setSaveInSentbox().
|
static |
Definition at line 1347 of file class.ilMail.php.
References $DIC, $lang, ilUtil\_getHttpPath(), ilLanguageFactory\_getLanguage(), and ILIAS_VERSION_NUMERIC.
Referenced by ilUserCronCheckAccounts\run(), ilMailSummaryNotification\send(), ilRemoteObjectBase\sendNewContentNotification(), ilECSObjectSettings\sendNewContentNotification(), and ilECSAppEventListener\sendNotification().
|
static |
Definition at line 1364 of file class.ilMail.php.
References $DIC.
Referenced by ilPDMailBlockGUI\getListItemForData(), ILIAS\Mail\Folder\MailFolderTableUI\getSender(), ilMailFolderGUI\printMail(), ilMailSummaryNotification\send(), and ilMailTest\testGetIliasMailerName().
|
static |
Definition at line 1385 of file class.ilMail.php.
References $DIC.
Referenced by ilObjUserGUI\__sendProfileMail(), ilForumMailNotification\addLinkToMail(), ilForumMailEventNotificationSender\createAttachmentLinkText(), ilTimingsCronReminder\fillObjectListForMailBody(), ilMailSummaryNotification\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ILIAS\User\Profile\ChangeMail\Mail\sendEmailToExistingAddress(), ILIAS\User\Profile\ChangeMail\Mail\sendEmailToNewEmailAddress(), and ILIAS\LegalDocuments\ConsumerToolbox\Mail\sendGeneric().
ilMail::appendInstallationSignature | ( | ?bool | $a_flag = null | ) |
Definition at line 1375 of file class.ilMail.php.
ilMail::autoresponder | ( | ) |
Definition at line 104 of file class.ilMail.php.
|
private |
Definition at line 867 of file class.ilMail.php.
References ilStr\strLen().
|
private |
Definition at line 892 of file class.ilMail.php.
References Vendor\Package\$e.
ilMail::countMailsOfFolder | ( | int | $folder_id | ) |
Definition at line 265 of file class.ilMail.php.
References $res.
|
private |
Definition at line 1458 of file class.ilMail.php.
References $user_id.
|
private |
list<string> | $attachments |
array<int,string[]> | $usr_id_to_external_email_addresses_map |
Definition at line 780 of file class.ilMail.php.
References $message.
ilMail::deleteMails | ( | array | $mail_ids | ) |
list<int> | $mailIds |
Definition at line 376 of file class.ilMail.php.
References $id.
Referenced by deleteMailsOfFolder().
ilMail::deleteMailsOfFolder | ( | int | $folder_id | ) |
Definition at line 276 of file class.ilMail.php.
References $mail_data, deleteMails(), and getMailsOfFolder().
|
private |
Definition at line 592 of file class.ilMail.php.
References MailDeliveryData\getBcc(), MailDeliveryData\getCc(), MailDeliveryData\getTo(), MailDeliveryData\isUsePlaceholder(), and ILIAS\Repository\logger().
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
list<string> | $a_attachment |
Definition at line 975 of file class.ilMail.php.
ilMail::existsRecipient | ( | string | $new_recipient, |
string | $existing_recipients | ||
) |
Definition at line 132 of file class.ilMail.php.
References parseAddresses().
|
private |
Definition at line 389 of file class.ilMail.php.
References ILIAS\Repository\int().
Referenced by getMail(), getMailsOfFolder(), getNextMail(), and getPreviousMail().
ilMail::formatLinebreakMessage | ( | string | $message | ) |
Definition at line 1453 of file class.ilMail.php.
References $message.
ilMail::formatNamesForOutput | ( | string | $recipients | ) |
Definition at line 163 of file class.ilMail.php.
References ilObjUser\_lookupId(), ilObjUser\_lookupPref(), getUserInstanceById(), and ILIAS\Repository\lng().
|
private |
Definition at line 1307 of file class.ilMail.php.
|
private |
Definition at line 1321 of file class.ilMail.php.
|
private |
Definition at line 1334 of file class.ilMail.php.
ilMail::getMail | ( | int | $mail_id | ) |
Definition at line 284 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getMailObjectReferenceId | ( | ) |
Definition at line 158 of file class.ilMail.php.
|
private |
Definition at line 1436 of file class.ilMail.php.
ilMail::getMailsOfFolder | ( | int | $a_folder_id, |
array | $filter = [] |
||
) |
Definition at line 234 of file class.ilMail.php.
References $res, and fetchMailData().
Referenced by deleteMailsOfFolder().
ilMail::getNewDraftId | ( | int | $folder_id | ) |
Definition at line 439 of file class.ilMail.php.
ilMail::getNextMail | ( | int | $mail_id | ) |
Definition at line 213 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
ilMail::getPreviousMail | ( | int | $mail_id | ) |
Definition at line 192 of file class.ilMail.php.
References $mail_data, $res, and fetchMailData().
|
static |
Definition at line 1391 of file class.ilMail.php.
References $DIC, $lang, ilObjUser\_lookupGender(), and ilObjUser\_lookupName().
Referenced by ilTestManScoringParticipantNotification\buildBody(), ilUserCronCheckAccounts\run(), ilCalendarMailNotification\send(), ilBuddySystemNotification\send(), ilCourseMembershipMailNotification\send(), ilDataCollectionMailNotification\send(), ilExerciseMailNotification\send(), ilGroupMembershipMailNotification\send(), ilIndividualAssessmentPrimitiveInternalNotificator\send(), ilLMMailNotification\send(), ilLearningSequenceMembershipMailNotification\send(), ilMailSummaryNotification\send(), ILIAS\Mail\Cron\ExpiredOrOrphanedMails\MailNotification\send(), ILIAS\Portfolio\Notification\SharedNotification\send(), ilRegistrationMailNotification\send(), ilSessionMembershipMailNotification\send(), ilTestMailNotification\sendAdvancedNotification(), and ilTestMailNotification\sendSimpleNotification().
ilMail::getSaveInSentbox | ( | ) |
Definition at line 148 of file class.ilMail.php.
References $save_in_sentbox.
|
private |
Definition at line 1184 of file class.ilMail.php.
|
private |
list<string> | $recipients |
Definition at line 849 of file class.ilMail.php.
|
private |
Definition at line 1413 of file class.ilMail.php.
Referenced by formatNamesForOutput().
|
private |
Definition at line 127 of file class.ilMail.php.
References ANONYMOUS_USER_ID.
ilMail::markRead | ( | array | $mail_ids | ) |
list<int> | $mail_ids |
Definition at line 300 of file class.ilMail.php.
References $user_id.
ilMail::markUnread | ( | array | $mail_ids | ) |
list<int> | $mail_ids |
Definition at line 321 of file class.ilMail.php.
References $user_id.
ilMail::moveMailsToFolder | ( | array | $mail_ids, |
int | $folder_id | ||
) |
list<int> | $mail_ids |
Definition at line 342 of file class.ilMail.php.
References $user_id.
|
private |
Explode recipient string, allowed separators are ',' ';' ' '.
Definition at line 1285 of file class.ilMail.php.
References ILIAS\Repository\logger().
Referenced by existsRecipient().
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 = [] |
||
) |
list<string> | $a_attachments |
Definition at line 919 of file class.ilMail.php.
|
private |
Definition at line 153 of file class.ilMail.php.
References ilMailGlobalServices\getMailObjectRefId().
Referenced by __construct().
|
private |
Definition at line 557 of file class.ilMail.php.
References $context, and ilMailTemplateContextService\getTemplateContextById().
|
private |
Definition at line 587 of file class.ilMail.php.
References $message.
ilMail::retrieveFromStage | ( | ) |
Definition at line 954 of file class.ilMail.php.
References $res.
ilMail::saveAttachments | ( | array | $attachments | ) |
list<string> | $attachments |
Definition at line 1268 of file class.ilMail.php.
|
private |
list<string> | $attachment |
Definition at line 1197 of file class.ilMail.php.
|
private |
list<Recipient> | $recipients |
Definition at line 680 of file class.ilMail.php.
References $message, MailDeliveryData\getAttachments(), MailDeliveryData\getCc(), MailDeliveryData\getInternalMailId(), MailDeliveryData\getSubject(), MailDeliveryData\getTo(), and ILIAS\Repository\logger().
|
private |
Definition at line 492 of file class.ilMail.php.
References $message.
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.
list<string> | $attachments |
Definition at line 1090 of file class.ilMail.php.
References MailDeliveryData\getAttachments().
|
private |
list<int> | $to_usr_ids |
list<Recipient> | $cc_bcc_recipients |
Definition at line 660 of file class.ilMail.php.
|
private |
list<Recipient> | $recipients |
Definition at line 645 of file class.ilMail.php.
|
private |
list<int> | $to_usr_ids |
Definition at line 627 of file class.ilMail.php.
References $user_id, and MailDeliveryData\getMessage().
|
private |
list<string> | $attachments |
Definition at line 1222 of file class.ilMail.php.
References $message.
ilMail::setMailOptionsByUserIdMap | ( | array | $mail_options_by_usr_id_map | ) |
ilMailOptions[] | $mail_options_by_usr_id_map |
Definition at line 1448 of file class.ilMail.php.
ilMail::setSaveInSentbox | ( | bool | $save_in_sentbox | ) |
Definition at line 143 of file class.ilMail.php.
References $save_in_sentbox.
Referenced by __construct().
ilMail::setUserInstanceById | ( | array | $user_instances_by_id_map | ) |
array<int,ilObjUser> | $user_instances_by_id_map |
Definition at line 1431 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 = [] |
||
) |
list<string> | $a_attachments |
Definition at line 455 of file class.ilMail.php.
ilMail::validateRecipients | ( | string | $to, |
string | $cc, | ||
string | $bcc | ||
) |
Definition at line 1166 of file class.ilMail.php.
References Vendor\Package\$e.
ilMail::withContextId | ( | string | $context_id | ) |
Definition at line 109 of file class.ilMail.php.
References $context_id.
ilMail::withContextParameters | ( | array | $parameters | ) |
Definition at line 118 of file class.ilMail.php.
|
private |
Definition at line 40 of file class.ilMail.php.
|
private |
Definition at line 41 of file class.ilMail.php.
|
private |
Definition at line 43 of file class.ilMail.php.
Referenced by withContextId().
|
private |
Definition at line 44 of file class.ilMail.php.
|
private |
Definition at line 52 of file class.ilMail.php.
Referenced by __construct().
|
protected |
Definition at line 38 of file class.ilMail.php.
Referenced by ilFormatMail\appendSearchResult(), deleteMailsOfFolder(), getMail(), getNextMail(), and getPreviousMail().
|
private |
Definition at line 47 of file class.ilMail.php.
|
private |
Definition at line 51 of file class.ilMail.php.
|
private |
Definition at line 39 of file class.ilMail.php.
Referenced by getSaveInSentbox(), and setSaveInSentbox().
|
private |
Definition at line 33 of file class.ilMail.php.
Referenced by __construct().
|
private |
Definition at line 35 of file class.ilMail.php.
|
private |
Definition at line 36 of file class.ilMail.php.
int ilMail::$user_id |
Definition at line 34 of file class.ilMail.php.
Referenced by markRead(), markUnread(), and moveMailsToFolder().
|
private |
Definition at line 50 of file class.ilMail.php.
const string ilMail::ILIAS_HOST = 'ilias' |
Definition at line 30 of file class.ilMail.php.
Referenced by ilMailAddressTypeFactory\__construct(), and ilRoleMailboxSearch\searchRoleIdsByAddressString().
const string ilMail::PROP_CONTEXT_SUBJECT_PREFIX = 'subject_prefix' |