Commit f0843abd authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #566 in ZP/z-push from...

Merge pull request #566 in ZP/z-push from bugfix/ZP-1259-check-if-sm-data-is-empty-for-sendmail to develop

* commit '2072ec51':
  ZP-1259 Fixed typo in a variable.
  ZP-1259 Check if sm->data is empty for SendMail.
parents ce01d813 2072ec51
...@@ -433,10 +433,14 @@ class BackendKopano implements IBackend, ISearchProvider { ...@@ -433,10 +433,14 @@ class BackendKopano implements IBackend, ISearchProvider {
throw new StatusException("KopanoBackend->SendMail(): ZCP/KC version is too old, INETMAPI_IMTOMAPI is not available. Install at least ZCP version 7.0.6 or later.", SYNC_COMMONSTATUS_MAILSUBMISSIONFAILED, null, LOGLEVEL_FATAL); throw new StatusException("KopanoBackend->SendMail(): ZCP/KC version is too old, INETMAPI_IMTOMAPI is not available. Install at least ZCP version 7.0.6 or later.", SYNC_COMMONSTATUS_MAILSUBMISSIONFAILED, null, LOGLEVEL_FATAL);
return false; return false;
} }
$mimeLength = strlen($sm->mime);
ZLog::Write(LOGLEVEL_DEBUG, sprintf("KopanoBackend->SendMail(): RFC822: %d bytes forward-id: '%s' reply-id: '%s' parent-id: '%s' SaveInSent: '%s' ReplaceMIME: '%s'", ZLog::Write(LOGLEVEL_DEBUG, sprintf("KopanoBackend->SendMail(): RFC822: %d bytes forward-id: '%s' reply-id: '%s' parent-id: '%s' SaveInSent: '%s' ReplaceMIME: '%s'",
strlen($sm->mime), Utils::PrintAsString($sm->forwardflag), Utils::PrintAsString($sm->replyflag), $mimeLength, Utils::PrintAsString($sm->forwardflag), Utils::PrintAsString($sm->replyflag),
Utils::PrintAsString((isset($sm->source->folderid) ? $sm->source->folderid : false)), Utils::PrintAsString((isset($sm->source->folderid) ? $sm->source->folderid : false)),
Utils::PrintAsString(($sm->saveinsent)), Utils::PrintAsString(isset($sm->replacemime)) )); Utils::PrintAsString(($sm->saveinsent)), Utils::PrintAsString(isset($sm->replacemime)) ));
if ($mimeLength == 0) {
throw new StatusException("KopanoBackend->SendMail(): empty mail data", SYNC_COMMONSTATUS_MAILSUBMISSIONFAILED);
}
// Send-As functionality - https://jira.z-hub.io/browse/ZP-908 // Send-As functionality - https://jira.z-hub.io/browse/ZP-908
$sendingAsSomeone = false; $sendingAsSomeone = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment