45 $mailValueObjects = $this->mailJsonService->convertFromJson((
string) $input[1]->getValue());
47 foreach ($mailValueObjects as $mailValueObject) {
48 $mail =
new ilMail((
int) $input[0]->getValue());
50 $mail->setSaveInSentbox((
bool) $mailValueObject->shouldSaveInSentBox());
51 $contextId = $input[2]->getValue();
53 ->withContextId((
string) $contextId)
54 ->withContextParameters((array) unserialize($input[3]->getValue()));
56 $recipients = (string) $mailValueObject->getRecipients();
57 $recipientsCC = (string) $mailValueObject->getRecipientsCC();
58 $recipientsBCC = (string) $mailValueObject->getRecipientsBCC();
60 $this->dic->logger()->mail()->info(
62 'Mail delivery to recipients: "%s" CC: "%s" BCC: "%s" From sender: "%s"',
66 $mailValueObject->getFrom()
74 (
string) $mailValueObject->getSubject(),
75 (string) $mailValueObject->getBody(),
76 (array) $mailValueObject->getAttachments(),
77 (bool) $mailValueObject->isUsingPlaceholders()
getOutputType()
Type A single type.
isStateless()
bool returns true iff the job's output ONLY depends on the input. Stateless task results may be cache...
run(array $input, Observer $observer)
__construct()
ilMassMailDeliveryJob constructor.
getInputTypes()
Type[] A list of types that are taken as input.
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...