mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Mail - stop additional mail in sent folder when merging multiple contacts into email
This commit is contained in:
parent
f9e1e1b2a6
commit
ddd45ccc2e
@ -6972,40 +6972,43 @@ class Mail
|
||||
}
|
||||
if ($sendOK || $openAsDraft)
|
||||
{
|
||||
if ($this->folderExists($_folder,true))
|
||||
if ($openAsDraft)
|
||||
{
|
||||
if($this->isSentFolder($_folder))
|
||||
if($this->folderExists($_folder,true))
|
||||
{
|
||||
$flags = '\\Seen';
|
||||
} elseif($this->isDraftFolder($_folder)) {
|
||||
$flags = '\\Draft';
|
||||
} else {
|
||||
$flags = '';
|
||||
}
|
||||
$savefailed = false;
|
||||
try
|
||||
{
|
||||
$messageUid =$this->appendMessage($_folder,
|
||||
$mailObject->getRaw(),
|
||||
null,
|
||||
$flags);
|
||||
if($this->isSentFolder($_folder))
|
||||
{
|
||||
$flags = '\\Seen';
|
||||
} elseif($this->isDraftFolder($_folder)) {
|
||||
$flags = '\\Draft';
|
||||
} else {
|
||||
$flags = '';
|
||||
}
|
||||
$savefailed = false;
|
||||
try
|
||||
{
|
||||
$messageUid =$this->appendMessage($_folder,
|
||||
$mailObject->getRaw(),
|
||||
null,
|
||||
$flags);
|
||||
}
|
||||
catch (\Exception\WrongUserinput $e)
|
||||
{
|
||||
$savefailed = true;
|
||||
$alert_msg .= lang("Save of message %1 failed. Could not save message to folder %2 due to: %3",$Subject,$_folder,$e->getMessage());
|
||||
}
|
||||
// no send, save successful, and message_uid present
|
||||
if ($savefailed===false && $messageUid && is_null($sendOK))
|
||||
{
|
||||
$importID = $messageUid;
|
||||
$openComposeWindow = true;
|
||||
}
|
||||
}
|
||||
catch (\Exception\WrongUserinput $e)
|
||||
else
|
||||
{
|
||||
$savefailed = true;
|
||||
$alert_msg .= lang("Save of message %1 failed. Could not save message to folder %2 due to: %3",$Subject,$_folder,$e->getMessage());
|
||||
$alert_msg .= lang("Saving of message %1 failed. Destination Folder %2 does not exist.",$Subject,$_folder);
|
||||
}
|
||||
// no send, save successful, and message_uid present
|
||||
if ($savefailed===false && $messageUid && is_null($sendOK))
|
||||
{
|
||||
$importID = $messageUid;
|
||||
$openComposeWindow = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$savefailed = true;
|
||||
$alert_msg .= lang("Saving of message %1 failed. Destination Folder %2 does not exist.",$Subject,$_folder);
|
||||
}
|
||||
if ($sendOK)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user