diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 019ea02e192..5b6a0841e76 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -521,7 +521,7 @@ else
print $langs->trans("EMailsDesc")."
\n";
print "
\n";
-
+
print '
';
print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 5beae12a4fb..4dd07f13313 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -1046,7 +1046,7 @@ class FormMail extends Form
* This search into table c_email_templates. Used by the get_form function.
*
* @param DoliDB $db Database handler
- * @param string $type_template Get message for type=$type_template, type='all' also included.
+ * @param string $type_template Get message for model/type=$type_template, type='all' also included.
* @param string $user Get template public or limited to this user
* @param Translate $outputlangs Output lang object
* @param int $id Id of template to find, or -1 for first found with position 0, or 0 for first found whatever is position (priority order depends on lang provided or not) or -2 for exact match with label (no answer if not found)
@@ -1100,7 +1100,8 @@ class FormMail extends Form
}
else { // If there is no template at all
$defaultmessage='';
- if ($type_template=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
+ if ($type_template=='body') { $defaultmessage=$this->withbody; } // Special case to use this->withbody as content
+ elseif ($type_template=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
elseif ($type_template=='facture_relance') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
elseif ($type_template=='propal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendProposal"); }
elseif ($type_template=='supplier_proposal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); }