diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 855ce1ed7ad..d19269ffd5f 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -455,9 +455,11 @@ class FormMail extends Form
// Zone to select email template
if (count($modelmail_array) > 0)
{
+ $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id;
+
// If list of template is filled
$out .= '