fix for send with copy to additional folder

This commit is contained in:
Klaus Leithoff 2014-02-03 11:29:12 +00:00
parent c2aad7342f
commit f13dca4c34
2 changed files with 11 additions and 3 deletions

View File

@ -4650,6 +4650,10 @@ class mail_bo
//error_log(__METHOD__.__LINE__."$_folderName, $_header, $_body, $_flags");
$header = ltrim(str_replace("\n","\r\n",$_header));
$body = str_replace("\n","\r\n",$_body);
// the recent flag is the default enforced here ; as we assume the _flags is always set,
// we default it to hordes default (Recent) (, other wise we should not pass the parameter
// for flags at all)
if (empty($_flags)) $_flags = '\\Recent';
//if (!is_array($_flags) && stripos($_flags,',')!==false) $_flags=explode(',',$_flags);
//if (!is_array($_flags)) $_flags = (array) $_flags;
try

View File

@ -2597,8 +2597,9 @@ class mail_compose
return false;
}
}
#error_log("Mail Sent.!");
#error_log("Number of Folders to move copy the message to:".count($folder));
//error_log(__METHOD__.__LINE__."Mail Sent.!");
//error_log(__METHOD__.__LINE__."Number of Folders to move copy the message to:".count($folder));
//error_log(__METHOD__.__LINE__.array2string($folder));
if ((count($folder) > 0) || (isset($this->sessionData['uid']) && isset($this->sessionData['messageFolder']))
|| (isset($this->sessionData['forwardFlag']) && isset($this->sessionData['sourceFolder']))) {
$mail_bo = $this->mail_bo;
@ -2630,13 +2631,16 @@ class mail_compose
} elseif($mail_bo->isDraftFolder($folderName)) {
$flags = '\\Draft';
} else {
$flags = '';
$flags = '\\Seen';
}
#$mailHeader=explode('From:',$mail->getMessageHeader());
#$mailHeader[0].$mail->AddrAppend("Bcc",$mailAddr).'From:'.$mailHeader[1],
//error_log(__METHOD__.__LINE__.array2string($folderName));
//$mail_bo->reopen($folderName);
if ($mail_bo->folderExists($folderName,true)) {
try
{
//error_log(__METHOD__.__LINE__.array2string($folderName));
$mail_bo->appendMessage($folderName,
$sentMailHeader,
$sentMailBody,