diff options
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php index fbb52c45d38..38c875315bf 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php @@ -202,7 +202,7 @@ class EmailProvider extends AbstractProvider { $organizerEMail = substr($organizer->getValue(), 7); - if (!$this->mailer->validateMailAddress($organizerEMail)) { + if ($organizerEMail === false || !$this->mailer->validateMailAddress($organizerEMail)) { return null; } diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index bfc82c0ee90..1f9885c0064 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -178,7 +178,7 @@ class IMipPlugin extends SabreIMipPlugin { // Strip off mailto: $sender = substr($iTipMessage->sender, 7); $recipient = substr($iTipMessage->recipient, 7); - if (!$this->mailer->validateMailAddress($recipient)) { + if ($recipient === false || !$this->mailer->validateMailAddress($recipient)) { // Nothing to send if the recipient doesn't have a valid email address $iTipMessage->scheduleStatus = '5.0; EMail delivery failed'; return; @@ -239,9 +239,12 @@ class IMipPlugin extends SabreIMipPlugin { $message = $this->mailer->createMessage() ->setFrom([$fromEMail => $fromName]) - ->setReplyTo([$sender => $senderName]) ->setTo([$recipient => $recipientName]); + if ($sender !== false) { + $message->setReplyTo([$sender => $senderName]); + } + $template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data); $template->addHeader(); |