diff --git a/COPYRIGHT b/COPYRIGHT
index ed8a667acc8046dd084f2595c6467278af13c571..7457542f06013827c7872e5c33f1822fcebae165 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -52,6 +52,9 @@ http://www.fsf.org/licensing/licenses/index_html
 Copyright
 ---------
 
+Copyright (C) 2015
+- Marcos García <marcosgdf@gmail.com>
+
 Copyright (C) 2014
 - Laurent Destailleur <eldy@users.sourceforge.net>
 - Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
diff --git a/ChangeLog b/ChangeLog
index 2a49b467783ed3f2da9caa33b307113200f03834..da95f2964327e7081824cc45c3b04e2bd7a898bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ English Dolibarr ChangeLog
 - Fix: amarok is a bugged theme making dolidroid failed. We swith to eldy automatically with dolidroid.
 - Fix: withdrawal create error if in the same month are deleted previus withdrawals.
 - Fix: [ bug #1801 ] FAC_FORCE_DATE_VALIDATION constant alters supplier invoice date given to numeration modules
+- Fix: [ bug #1804 ] SQL error when sending email without addresee
 
 ***** ChangeLog for 3.6.2 compared to 3.6.1 *****
 - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 4929ee9c70e3f9c6ec13c14079952a2302dcce2c..57d2508aefeb8e8ad3cc6cc3e8c5ae25b53cc000 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -9,6 +9,7 @@
  * Copyright (C) 2010-2011 Philippe Grand        <philippe.grand@atoo-net.com>
  * Copyright (C) 2012-2013 Christophe Battarel   <christophe.battarel@altairis.fr>
  * Copyright (C) 2013-2014 Florian Henry		 <florian.henry@open-concept.pro>
+ * Copyright (C) 2015      Marcos García         <marcosgdf@gmail.com>
  *
  * 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
@@ -404,20 +405,23 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
 	$langs->load('mails');
 
 	if ($object->id > 0) {
+
+		$receiver = GETPOST('receiver');
+
 		if ($_POST ['sendto']) {
 			// Le destinataire a ete fourni via le champ libre
 			$sendto = $_POST ['sendto'];
 			$sendtoid = 0;
-		} elseif ($_POST ['receiver'] != '-1') {
+		} elseif ($receiver !== "") {
 			// Recipient was provided from combo list
-			if ($_POST ['receiver'] == 'thirdparty') 			// Id of third party
+			if ($receiver == 'thirdparty') 			// Id of third party
 			{
 				$sendto = $object->client->email;
 				$sendtoid = 0;
-			} else 			// Id du contact
+			} elseif ($receiver != '-1') 			// Id du contact
 			{
-				$sendto = $object->client->contact_get_property($_POST ['receiver'], 'email');
-				$sendtoid = $_POST ['receiver'];
+				$sendto = $object->client->contact_get_property($receiver, 'email');
+				$sendtoid = $receiver;
 			}
 		}