diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 044cc203cf81393208758b78e814e1e43da1f2f3..69c24341f9c51e5c7fea27ba254c7d6aac9f1051 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3917,7 +3917,10 @@ else if ($id > 0 || ! empty($ref))
 		$formmail->frommail = $user->email;
 		$formmail->withfrom=1;
 		$liste=array();
-		foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value)	$liste[$key]=$value;
+		foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value)
+		{
+			$liste[$key]=$value;
+		}
 		$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
 		$formmail->withtocc=$liste;
 		$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index e5dc008fc2ef6a0175c80b3cb17419e35144521d..66fd945c01d8d2909c67ca320909c4847dbffe21 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -566,12 +566,12 @@ class FormMail
         			if ($this->param["models"]=='order_send')
         			{
         				$url=getPaypalPaymentUrl(0,'order',$this->substit['__ORDERREF__']);
-        				$this->substit['__PERSONALIZED__']=$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url);
+        				$this->substit['__PERSONALIZED__']=str_replace('\n',"\n",$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url));
         			}
         			if ($this->param["models"]=='facture_send')
         			{
         				$url=getPaypalPaymentUrl(0,'invoice',$this->substit['__FACREF__']);
-        				$this->substit['__PERSONALIZED__']=$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url);
+        				$this->substit['__PERSONALIZED__']=str_replace('\n',"\n",$langs->transnoentitiesnoconv("PredefinedMailContentLink",$url));
         			}
         		}