From bf00b5d7957e98456c92813db34ea88476029b14 Mon Sep 17 00:00:00 2001 From: gschratzer Date: Mon, 24 Aug 2015 16:22:21 +0200 Subject: [PATCH] New: IMAP dolimail Support --- htdocs/core/actions_sendmails.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 2da72b8074e..2c7d0063905 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -163,7 +163,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } else // Id du contact { - $sendto = $thirdparty->contact_get_property($_POST['receiver'],'email'); + $sendto = $thirdparty->contact_get_property((int) $_POST['receiver'],'email'); $sendtoid = $_POST['receiver']; } } @@ -180,7 +180,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } else // Id du contact { - $sendtocc = $thirdparty->contact_get_property($_POST['receivercc'],'email'); + $sendtocc = $thirdparty->contact_get_property((int) $_POST['receivercc'],'email'); } } @@ -220,7 +220,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - + + $trackid = GETPOST('trackid','aZ'); + if($conf->dolimail->enabled) { $mailfromid = explode ("#", $_POST['frommail'],3); @@ -263,7 +265,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO } // Send mail require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1); + $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); if ($mailfile->error) { $mesgs[]='
'.$mailfile->error.'
';