Commit decf2ba2 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1259 Check if sm->data is empty for SendMail.

Released under the Affero GNU General Public License (AGPL) version 3.
parent ce01d813
...@@ -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;
} }
$mimeLenght = 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), $mimeLenght, 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 ($mimeLenght == 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