';
}
- if (! empty($mesgembedded)) dol_htmloutput_mesg($mesgembedded,'','warning',1);
+ if (! empty($mesgembedded))
+ {
+ dol_htmloutput_mesg($mesgembedded,'','warning',1);
+ print ' ';
+ }
// Affichage formulaire de TEST
if ($action == 'test')
diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php
index c412db448a9..0d01aa53912 100644
--- a/htdocs/core/modules/mailings/xinputuser.modules.php
+++ b/htdocs/core/modules/mailings/xinputuser.modules.php
@@ -104,7 +104,7 @@ class mailing_xinputuser extends MailingTargets
global $langs;
$s='';
- $s.='';
+ $s.='';
return $s;
}
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index 2fd9c09c534..0ad86123313 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email
ActivateCheckRead=Allow to use the "Unsubcribe" link
ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature
EMailSentToNRecipients=EMail sent to %s recipients.
+XTargetsAdded=%s recipients added into target list
EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email.
MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s)
SendRemind=Send reminder by EMails
diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php
index aef1bc7f846..4f341b7a39b 100755
--- a/scripts/emailings/mailing-send.php
+++ b/scripts/emailings/mailing-send.php
@@ -144,19 +144,21 @@ if ($resql)
$other3=$other[2];
$other4=$other[3];
$other5=$other[4];
+ // Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email,
- '__CHECK_READ__' => '',
- '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'',
- '__MAILTOEMAIL__' => ''.$obj2->email.'',
'__LASTNAME__' => $obj2->lastname,
'__FIRSTNAME__' => $obj2->firstname,
+ '__MAILTOEMAIL__' => ''.$obj2->email.'',
'__OTHER1__' => $other1,
'__OTHER2__' => $other2,
'__OTHER3__' => $other3,
'__OTHER4__' => $other4,
- '__OTHER5__' => $other5
+ '__OTHER5__' => $other5,
+ '__SIGNATURE__' => '', // Signature is empty when ran from command line (user is a bot)
+ '__CHECK_READ__' => '',
+ '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").''
);
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
{
diff --git a/test/phpunit/testemailing.txt b/test/phpunit/testemailing.txt
new file mode 100644
index 00000000000..a8b34c83393
--- /dev/null
+++ b/test/phpunit/testemailing.txt
@@ -0,0 +1 @@
+test@bidon.com;Name of user;Lastname of user;Other
\ No newline at end of file