diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index bfb66f1c83c..4c7833c8b4e 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -96,7 +96,7 @@ class Contacts extends DolibarrApi if ($includeroles) { $this->contact->fetchRoles(); } - + if (isModEnabled('mailing')) { $this->contact->getNoEmail(); } @@ -144,7 +144,7 @@ class Contacts extends DolibarrApi if ($includeroles) { $this->contact->fetchRoles(); } - + if (isModEnabled('mailing')) { $this->contact->getNoEmail(); } @@ -330,7 +330,7 @@ class Contacts extends DolibarrApi } $this->contact->$field = $value; } - + if (isModEnabled('mailing') && !empty($this->contact->email)) { $this->contact->setNoEmail($this->contact->no_email); }