diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 8e3b5064a70..7618334aa86 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -337,16 +337,30 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$i++;
}
}
+ else
+ {
+ setEventMessage($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo"));
+ }
// Loop finished, set global statut of mail
if ($nbko > 0)
{
$statut=2; // Status 'sent partially' (because at least one error)
+ if ($nbok > 0) setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok));
+ else setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok));
}
else
{
- if ($nbok >= $num) $statut=3; // Send to everybody
- else $statut=2; // Status 'sent partially' (because not send to everybody)
+ if ($nbok >= $num)
+ {
+ $statut=3; // Send to everybody
+ setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok));
+ }
+ else
+ {
+ $statut=2; // Status 'sent partially' (because not send to everybody)
+ setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok));
+ }
}
$sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$object->id;
@@ -388,8 +402,8 @@ if ($action == 'send' && empty($_POST["cancel"]))
if (preg_match('/[\s\t]*/i',$object->body)) $msgishtml=1;
// Pratique les substitutions sur le sujet et message
- $object->sujet=make_substitutions($object->sujet,$object->substitutionarrayfortest);
- $object->body=make_substitutions($object->body,$object->substitutionarrayfortest);
+ $tmpsujet=make_substitutions($object->sujet,$object->substitutionarrayfortest);
+ $tmpbody=make_substitutions($object->body,$object->substitutionarrayfortest);
$arr_file = array();
$arr_mime = array();
@@ -412,7 +426,7 @@ if ($action == 'send' && empty($_POST["cancel"]))
}
}
- $mailfile = new CMailFile($object->sujet,$object->sendto,$object->email_from,$object->body, $arr_file,$arr_mime,$arr_name,'', '', 0, $msgishtml,$object->email_errorsto,$arr_css);
+ $mailfile = new CMailFile($tmpsujet,$object->sendto,$object->email_from,$tmpbody, $arr_file,$arr_mime,$arr_name,'', '', 0, $msgishtml,$object->email_errorsto,$arr_css);
$result=$mailfile->sendfile();
if ($result)
@@ -1148,7 +1162,6 @@ else
}
}
-
llxFooter();
$db->close();
?>
diff --git a/htdocs/langs/el_GR/mails.lang b/htdocs/langs/el_GR/mails.lang
index 3bde9b407b2..c2dd5f02e21 100644
--- a/htdocs/langs/el_GR/mails.lang
+++ b/htdocs/langs/el_GR/mails.lang
@@ -76,42 +76,7 @@ MailingModuleDescDolibarrUsers=All Dolibarr users with emails
MailingModuleDescFundationMembers=Foundation members with emails
MailingModuleDescEmailsFromFile=EMails from a text file (email;name;surname;comments)
MailingModuleDescContactsCategories=Στοιχεία με emails (ανά κατηγορία)
-MailingModuleDescDolibarrContractsLinesExpired=Third parties with expired contract's lines
-LineInFile=Line %s in file
-RecipientSelectionModules=Defined requests for recipient's selection
-MailSelectedRecipients=Selected recipients
-MailingArea=EMailings area
-LastMailings=Last %s emailings
-TargetsStatistics=Targets statistics
-NbOfCompaniesContacts=Unique contacts of companies
-MailNoChangePossible=Recipients for validated emailing can't be changed
-SearchAMailing=Search mailing
-SendMailing=Send emailing
-SendMail=Send email
-SentBy=Sent by
-MailingNeedCommand=For securities reason, sending an emailing should be performed from command line. Ask your administrator to launch the following command to send the emailing to all recipients:
-MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other.
-ConfirmSendingEmailing=Are you sure you want to send mailing ?
-LimitSendingEmailing=On line sending of emailings are limited for security and timeout reasons to %s recipients by sending session.
-TargetsReset=Clear list
-ToClearAllRecipientsClickHere=Click here to clear the recipient list for this emailing
-ToAddRecipientsChooseHere=Add recipients by choosing from the lists
-NbOfEMailingsReceived=Mass emailings received
-IdRecord=ID record
-DeliveryReceipt=Delivery Receipt
-YouCanUseCommaSeparatorForSeveralRecipients=You can use the comma separator to specify several recipients.
-
-# Module Notifications
-Notifications=Notifications
-NoNotificationsWillBeSent=No email notifications are planned for this event and company
-ANotificationsWillBeSent=1 notification will be sent by email
-SomeNotificationsWillBeSent=%s notifications will be sent by email
-AddNewNotification=Activate a new email notification request
-ListOfActiveNotifications=List all active email notification requests
-ListOfNotificationsDone=List all email notifications sent
-
-
// START - Lines generated via autotranslator.php tool (2011-06-26 15:35:22).
// Reference language: en_US -> el_GR
MailingModuleDescContactsByCompanyCategory=Επαφές των τρίτων (από τρίτη κατηγορία μέρη)
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index f9c0d0f198f..97d6dbd92cd 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -79,6 +79,7 @@ YourMailUnsubcribeOK=The email %s is correctly unsubcribe from mailing l
MailtoEMail=Hyper link to email
ActivateCheckRead=Allow to use the Read receipt tracker and the unsubcribe link
ActivateCheckReadKey=Key use to encrypt URL use for Read Receipt and unsubcribe function
+EMailSentToNRecipients=EMail sent to %s recipients.
# Libelle des modules de liste de destinataires mailing
MailingModuleDescContactCompanies=Contacts of all third parties (customer, prospect, supplier, ...)
@@ -105,7 +106,7 @@ SearchAMailing=Search mailing
SendMailing=Send emailing
SendMail=Send email
SentBy=Sent by
-MailingNeedCommand=For security reason, sending an emailing should be performed from command line. Ask your administrator to launch the following command to send the emailing to all recipients:
+MailingNeedCommand=For security reason, sending an emailing is better when performed from command line. Ask your administrator to launch the following command to send the emailing to all recipients:
MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other.
ConfirmSendingEmailing=Are you sure you want to send emailing without command line and from web mode ?
LimitSendingEmailing=On line sending of emailings are limited for security and timeout reasons to %s recipients by sending session.
diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang
index 78c70886cd0..db8dc5d88eb 100644
--- a/htdocs/langs/fr_FR/mails.lang
+++ b/htdocs/langs/fr_FR/mails.lang
@@ -79,6 +79,7 @@ YourMailUnsubcribeOK=L'adresse e-mail %s est bien désincrite de la liste
MailtoEMail=Ecrire a e-mail (lien)
ActivateCheckRead=Permettre l'utilisation du tracker d'accusé de lecture et du lien de désincription
ActivateCheckReadKey=Clef de sécurité utilisée pour l'encryption des URL utilisées dans les fonctions d'accusé de lecture et de désincription
+EMailSentToNRecipients=EMail envoyé à %s destinataires.
# Libelle des modules de liste de destinataires mailing
MailingModuleDescContactCompanies=Contacts de tiers (prospects, clients, fournisseurs...)