diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index c80358315c6..68da2dce777 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -4,6 +4,7 @@
* Copyright (C) 2010-2011 Juanjo Menent
* Copyright (C) 2015-2017 Marcos García
* Copyright (C) 2015-2017 Nicolas ZABOURI
+ * Copyright (C) 2018 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
@@ -44,7 +45,28 @@ class FormMail extends Form
public $fromname;
public $frommail;
- public $replytoname;
+
+ /**
+ * @var string user, company, robot
+ */
+ public $fromtype;
+
+ /**
+ * @var int ID
+ */
+ public $fromid;
+
+ /**
+ * @var string thirdparty etc
+ */
+ public $totype;
+
+ /**
+ * @var int ID
+ */
+ public $toid;
+
+ public $replytoname;
public $replytomail;
public $toname;
public $tomail;
@@ -91,11 +113,6 @@ class FormMail extends Form
public $withtouser=array();
public $withtoccuser=array();
- /**
- * @var string Error code (or message)
- */
- public $error='';
-
public $lines_model;