mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-11 17:20:53 +01:00
Mail - stop additional mail in sent folder when merging multiple contacts into email
This commit is contained in:
parent
310359ab9f
commit
cd661ed3ba
@ -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