diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 00c1c4236c4..74f11a16e5a 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -4,7 +4,7 @@
* Copyright (C) 2010-2011 Juanjo Menent
* Copyright (C) 2015-2017 Marcos García
* Copyright (C) 2015-2017 Nicolas ZABOURI
- * Copyright (C) 2018-2019 Frédéric France
+ * Copyright (C) 2018-2021 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -584,7 +584,10 @@ class FormMail extends Form
$liste['company'] = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
// Add also email aliases if there is some
- $listaliases = array('user_aliases'=>$user->email_aliases, 'global_aliases'=>$conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
+ $listaliases = array(
+ 'user_aliases' => (empty($user->email_aliases) ? '' : $user->email_aliases),
+ 'global_aliases' => getDolGlobalString('$conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES'),
+ );
// Also add robot email
if (!empty($this->fromalsorobot)) {