forked from Wavyzz/dolibarr
Add important warning on sendmail setup to allow to send email from dolibarr.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/mails.php
|
||||
* \brief Page to setup emails sending
|
||||
* \version $Id: mails.php,v 1.73 2011/07/10 20:03:39 eldy Exp $
|
||||
* \version $Id: mails.php,v 1.74 2011/07/20 13:01:04 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -592,8 +592,18 @@ else
|
||||
print '</table>';
|
||||
|
||||
|
||||
// Boutons actions
|
||||
if ($linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
{
|
||||
$sendmailoption=ini_get('mail.force_extra_parameters');
|
||||
//print 'x'.$sendmailoption;
|
||||
if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption))
|
||||
{
|
||||
print '<br>'.info_admin($langs->trans("SendmailOptionNotComplete"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Boutons actions
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
@@ -737,5 +747,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/10 20:03:39 $ - $Revision: 1.73 $');
|
||||
llxFooter('$Date: 2011/07/20 13:01:04 $ - $Revision: 1.74 $');
|
||||
?>
|
||||
|
||||
@@ -843,6 +843,8 @@ MAIN_PROXY_USER=Login to use the proxy server
|
||||
MAIN_PROXY_PASS=Password to use the proxy server
|
||||
DefineHereComplementaryAttributes=Define here all atributes, not already available by default, and that you want to be supported for %s.
|
||||
ExtraFields=Complementary attributes
|
||||
SendingMailSetup=Setup of sendings by email
|
||||
SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must conatins option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba).
|
||||
|
||||
##### Module password generation
|
||||
PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase.
|
||||
|
||||
@@ -856,6 +856,7 @@ MAIN_PROXY_PASS=Mot de passe pour passer le serveur proxy mandataire
|
||||
DefineHereComplementaryAttributes=Definissez ici la liste des attributs supplémentaire, non disponible en standard, et que vous voulez voir gérez sur les %s.
|
||||
ExtraFields=Attributs suplémentaires
|
||||
SendingMailSetup=Configuration de l'envoi par mail
|
||||
SendmailOptionNotComplete=Attention, sur certains systèmes Linux, avec cette méthode d'envoi, pour pouvoir envoyer des mails en votre nom, la configuration d'exécution de sendmail doit contenir l'option <b>-ba</b> (paramètre <b>mail.force_extra_parameters</b> dans le fichier <b>php.ini</b>). Si certains de vos destinataires ne reçoivent pas de message, essayer de modifer ce paramètre PHP avec <b>mail.force_extra_parameters = -ba</b>.
|
||||
|
||||
##### Module password generation= undefined
|
||||
PasswordGenerationStandard= Renvoie un mot de passe généré selon algorithme interne Dolibarr: 8 caractères, chiffres et caractères en minuscules mélangés.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/lib/CMailFile.class.php
|
||||
* \brief File of class to send emails (with attachments or not)
|
||||
* \version $Id: CMailFile.class.php,v 1.146 2011/07/20 11:07:12 eldy Exp $
|
||||
* \version $Id: CMailFile.class.php,v 1.147 2011/07/20 13:01:03 eldy Exp $
|
||||
* \author Dan Potter.
|
||||
* \author Eric Seigne
|
||||
* \author Laurent Destailleur.
|
||||
@@ -340,12 +340,16 @@ class CMailFile
|
||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG);
|
||||
|
||||
$bounce = ''; // By default
|
||||
if ($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F)
|
||||
if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F))
|
||||
{
|
||||
// le return-path dans les header ne fonctionne pas avec tous les MTA
|
||||
// Le passage par -f est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie.
|
||||
// La variable definie pose des pb avec certains sendmail securisee (option -f refusee car dangereuse)
|
||||
$bounce = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $conf->global->MAIN_MAIL_ERRORS_TO : ($this->addr_from != '' ? '-f' . $this->addr_from : '') );
|
||||
$bounce .= ($bounce?' ':'').(! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $conf->global->MAIN_MAIL_ERRORS_TO : ($this->addr_from != '' ? '-f' . $this->addr_from : '') );
|
||||
}
|
||||
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_BA)) // To force usage of -ba option. This option tells sendmail to read From: or Sender: to setup sender
|
||||
{
|
||||
$bounce .= ($bounce?' ':'').'-ba';
|
||||
}
|
||||
|
||||
$this->message=stripslashes($this->message);
|
||||
|
||||
Reference in New Issue
Block a user