diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d56f9419989..723ff70139d 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -602,7 +602,7 @@ if (empty($reshook)) { $result = $object->create($user); - if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email)) { + if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email) && !empty($object->no_email)) { // Add mass emailing flag into table mailing_unsubscribe $result = $object->setNoEmail($object->no_email); if ($result < 0) {