New: Add a default errors-to for emailing module.

This commit is contained in:
Laurent Destailleur 2009-12-29 20:32:59 +00:00
parent fe64eb07eb
commit f7be904ab6
7 changed files with 27 additions and 13 deletions

View File

@ -4,7 +4,8 @@ English Dolibarr ChangeLog
***** ChangeLog for 2.8 compared to 2.7 *****
For users:
- New: Can filter on user on stock movement list
- New: Add a default errors-to email for emailing module.
- New: Can filter on user on stock movement list.
- New: When creating a third party from a member, it is set as a new
customer.
- New: Can use {tttt} in numbering mask setup. It will be replaced

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.org>
*
* 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
@ -16,13 +16,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
\file htdocs/admin/mailing.php
\ingroup mailing
\brief Page to setup emailing module
\version $Id$
*/
* \file htdocs/admin/mailing.php
* \ingroup mailing
* \brief Page to setup emailing module
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
@ -38,8 +39,9 @@ if (!$user->admin)
if ($_POST["action"] == 'setvalue' && $user->admin)
{
$result=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$_POST["email_from"],'chaine',0,'',$conf->entity);
if ($result >= 0)
$result1=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$_POST["MAILING_EMAIL_FROM"],'chaine',0,'',$conf->entity);
$result2=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$_POST["MAILING_EMAIL_ERRORSTO"],'chaine',0,'',$conf->entity);
if (($result1 + $result2) == 2)
{
$mesg='<div class="ok">'.$langs->trans("Success").'</div>';
}
@ -74,10 +76,17 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("MailingEMailFrom").'</td><td>';
print '<input size="32" type="text" name="email_from" value="'.$conf->global->MAILING_EMAIL_FROM.'">';
print '<input size="32" type="text" name="MAILING_EMAIL_FROM" value="'.$conf->global->MAILING_EMAIL_FROM.'">';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("MailingEMailError").'</td><td>';
print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf->global->MAILING_EMAIL_ERRORSTO.'">';
print '</td></tr>';
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';

View File

@ -497,7 +497,7 @@ if ($_GET["action"] == 'create')
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.$conf->global->MAILING_EMAIL_ERRORSTO.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value="'.$_POST['sujet'].'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("BackgroundColor").'</td><td colspan="3">';
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
$htmlother->select_color($_POST['bgcolor'],'bgcolor','new_mailing');
print '</td></tr>';
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
@ -761,7 +761,7 @@ else
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3"><input class="flat" type="text" size=40 name="from" value="'.$mil->email_from.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3"><input class="flat" type="text" size=40 name="errorsto" value="'.$mil->email_errorsto.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("MailTopic").'</td><td colspan="3"><input class="flat" type="text" size=60 name="sujet" value="'.$mil->sujet.'"></td></tr>';
print '<tr><td width="25%">'.$langs->trans("BackgroundColor").'</td><td colspan="3">';
print '<tr><td width="25%">'.$langs->trans("BackgroundColorByDefault").'</td><td colspan="3">';
$htmlother->select_color($mil->bgcolor,'bgcolor','edit_mailing');
print '</td></tr>';
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';

View File

@ -1013,6 +1013,7 @@ NewRSS=New RSS Feed
##### Mailing #####
MailingSetup=EMailing module setup
MailingEMailFrom=Sender EMail (From) for emails sent by emailing module
MailingEMailError=Return EMail (Errors-to) for emails with errors
##### Notification #####
NotificationSetup=Notification bu email module setup
NotificationEMailFrom=Sender EMail (From) for emails sent for notifications

View File

@ -46,6 +46,7 @@ ErrorNoSocialContributionForSellerCountry=Error, no social contribution type def
ErrorFailedToSaveFile=Error, failed to save file.
ErrorOnlyPngJpgSupported=Error, only .png and .jpg image format file are supported.
ErrorImageFormatNotSupported=Your PHP does not support functions to convert images of this format.
BackgroundColorByDefault=Default background color
GoToWikiHelpPage=Read online help (need Internet access)
GoToHelpPage=Read help
RecordSaved=Record saved

View File

@ -1014,6 +1014,7 @@ NewRSS = Syndication d'un nouveau flux RSS
##### Mailing ##### = undefined
MailingSetup = Configuration du module EMailing
MailingEMailFrom = Email emetteur (From) des mails envoyés par EMailing
MailingEMailError = EMail retour (Errors-to) pour les réponses lors des envois par EMailing en erreur.
##### Notification ##### = undefined
NotificationSetup = Configuration du module Notification
NotificationEMailFrom = Email emetteur (From) des mails envoyés lors des notifications

View File

@ -46,6 +46,7 @@ ErrorNoSocialContributionForSellerCountry=Erreur, aucun type de charges défini
ErrorFailedToSaveFile=Erreur, l'enregistrement du fichier a échoué.
ErrorOnlyPngJpgSupported=Erreur, seuls les formats images .jpg et .png sont supportés.
ErrorImageFormatNotSupported=Votre PHP ne supporte pas les fonctions de conversion de ce format d'image.
BackgroundColorByDefault=Couleur de fond
GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet)
GoToHelpPage=Consulter l'aide
RecordSaved=Enregistrement sauvegardé