aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-08-09 22:10:12 +0000
committerrub <rub@piwigo.org>2006-08-09 22:10:12 +0000
commite097dba6a6a7220b0a109672bc68d32c4d70217c (patch)
tree2e891f7f44e6692f3ceae2a6e2af4b2217387a6a /include
parent9d38573074ff6601b3f3592bfbf2718b2e63382c (diff)
Resolved Issue ID 0000507:
o format of email o max_execution_time equal to 0 o -f with only adress mail o use of standard function get_webmaster_mail_address 2 news $conf parameters. Merge branch-1_6 r1529:1530 into BSF git-svn-id: http://piwigo.org/svn/trunk@1531 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/config_default.inc.php15
-rw-r--r--include/functions_mail.inc.php19
2 files changed, 27 insertions, 7 deletions
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 0fb9eef43..2f573cc5a 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -205,6 +205,12 @@ $conf['mail_options'] = false;
// or test.
$conf['send_bcc_mail_webmaster'] = false;
+// enabled_format_email:
+// on true email will be formatted with name and address
+// on false email will be only address
+// There are webhosting wich not allow email formatted (Lycos, ...)
+$conf['enabled_format_email'] = true;
+
// check_upgrade_feed: check if there are database upgrade required. Set to
// true, a message will strongly encourage you to upgrade your database if
// needed.
@@ -478,13 +484,18 @@ $conf['tags_levels'] = 5;
// Default Value for nbm user
$conf['nbm_default_value_user_enabled'] = false;
-// Search List user to send with quick (List all without check news)
+// Search list user to send quickly (List all without to check news)
// More quickly but less fun to use
$conf['nbm_list_all_enabled_users_to_send'] = false;
-// Max mails sended on one pass
+// Max time used on one pass in order to send mails.
+// Timeout delay ratio.
$conf['nbm_max_treatment_timeout_percent'] = 0.8;
+// If timeout cannot be compite with nbm_max_treatment_timeout_percent,
+// nbm_treatment_timeout_default is used by default
+$conf['nbm_treatment_timeout_default'] = 20;
+
// +-----------------------------------------------------------------------+
// | Set default admin layout |
// +-----------------------------------------------------------------------+
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index a209c6f04..30a288278 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -78,15 +78,24 @@ function get_mail_configuration()
*/
function format_email($name, $email)
{
- $cvt7b_name = str_translate_to_ascii7bits($name);
+ global $conf;
- if (strpos($email, '<') === false)
+ if ($conf['enabled_format_email'])
{
- return $cvt7b_name.' <'.$email.'>';
+ $cvt7b_name = str_translate_to_ascii7bits($name);
+
+ if (strpos($email, '<') === false)
+ {
+ return $cvt7b_name.' <'.$email.'>';
+ }
+ else
+ {
+ return $cvt7b_name.$email;
+ }
}
else
{
- return $cvt7b_name.$email;
+ return $email;
}
}
@@ -128,7 +137,7 @@ function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '')
if ($conf_mail['mail_options'])
{
- $options = '-f '.$from;
+ $options = '-f '.$conf_mail['email_webmaster'];
return mail($to, $cvt7b_subject, $content, $headers, $options);
}