diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index eea69e37c13..8a29a268e68 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -319,7 +319,6 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - // Feature to push mail sent into Sent folder if (! empty($conf->dolimail->enabled)) { diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 217a5367ecf..bfe7db71aca 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -790,8 +790,10 @@ if (empty($reshook)) $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } - // Actions to send emails $id=$socid; + $object->fetch($socid); + + // Actions to send emails $trigger_name='COMPANY_SENTBYMAIL'; $paramname='socid'; $mode='emailfromthirdparty';