Skip to content

Commit

Permalink
Bug: 14820 Protect against null imap adapters.
Browse files Browse the repository at this point in the history
This would be the case if we havne't configured email support
for EAS. Unfortunately clients assume it's always there, so will
gladly continue sending a meeting invite over and over...
  • Loading branch information
mrubinsk committed Jun 2, 2018
1 parent 709a19c commit 4307f97
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Horde/Core/ActiveSync/Driver.php
Expand Up @@ -2196,6 +2196,14 @@ public function sendMail(
$rfc822, $forward = false, $reply = false, $parent = false, $save = true,
Horde_ActiveSync_Message_SendMail $message = null)
{
// Ignore if we do not support email operations.
// @TODO: This assumes the only way to not have an imap object is
// if we turn off email support. We should probably make this a flag.
if (empty($this->_imap)) {
$this->_logger->notice("No IMAP object. Ignoring.");
return true;
}

ob_start();
$mailer = new Horde_Core_ActiveSync_Mail($this->_imap, $this->_user, $this->_version);
$raw_message = !empty($message)
Expand Down

0 comments on commit 4307f97

Please sign in to comment.