New: IMAP dolimail Support

This commit is contained in:
gschratzer 2015-08-24 16:22:21 +02:00
parent 7c550fdba5
commit bf00b5d795

View File

@ -163,7 +163,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
} }
else // Id du contact else // Id du contact
{ {
$sendto = $thirdparty->contact_get_property($_POST['receiver'],'email'); $sendto = $thirdparty->contact_get_property((int) $_POST['receiver'],'email');
$sendtoid = $_POST['receiver']; $sendtoid = $_POST['receiver'];
} }
} }
@ -180,7 +180,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
} }
else // Id du contact 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']; $filepath = $attachedfiles['paths'];
$filename = $attachedfiles['names']; $filename = $attachedfiles['names'];
$mimetype = $attachedfiles['mimes']; $mimetype = $attachedfiles['mimes'];
$trackid = GETPOST('trackid','aZ');
if($conf->dolimail->enabled) if($conf->dolimail->enabled)
{ {
$mailfromid = explode ("#", $_POST['frommail'],3); $mailfromid = explode ("#", $_POST['frommail'],3);
@ -263,7 +265,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
} }
// Send mail // Send mail
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; 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) if ($mailfile->error)
{ {
$mesgs[]='<div class="error">'.$mailfile->error.'</div>'; $mesgs[]='<div class="error">'.$mailfile->error.'</div>';