diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index bbef7fbd882..8e24402e51e 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -341,7 +341,7 @@ class FormMail
$soc->fetch($this->toid);
$out.= $soc->getNomUrl(1);
}
- if ($this->totype == 'contact')
+ else if ($this->totype == 'contact')
{
$contact=new Contact($this->db);
$contact->fetch($this->toid);