Changeset 1530


Ignore:
Timestamp:
Aug 10, 2006, 12:05:29 AM (18 years ago)
Author:
rub
Message:

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.

Location:
branches/branch-1_6
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/admin/include/functions_notification_by_mail.inc.php

    r1178 r1530  
    3535          );
    3636
     37if
     38  (
     39    (!isset($env_nbm['sendmail_timeout'])) or
     40    (!is_numeric($env_nbm['sendmail_timeout'])) or
     41    ($env_nbm['sendmail_timeout'] <= 0)
     42  )
     43{
     44  $env_nbm['sendmail_timeout'] = $conf['nbm_treatment_timeout_default'];
     45}
    3746
    3847/*
  • branches/branch-1_6/include/config_default.inc.php

    r1471 r1530  
    206206$conf['send_bcc_mail_webmaster'] = false;
    207207
     208// enabled_format_email:
     209//  on true email will be formatted with name and address
     210//  on false email will be only address
     211// There are webhosting wich not allow email formatted (Lycos, ...)
     212$conf['enabled_format_email'] = true;
     213
    208214// check_upgrade_feed: check if there are database upgrade required. Set to
    209215// true, a message will strongly encourage you to upgrade your database if
     
    479485$conf['nbm_default_value_user_enabled'] = false;
    480486
    481 // Search List user to send with quick (List all without check news)
     487// Search list user to send quickly (List all without to check news)
    482488// More quickly but less fun to use
    483489$conf['nbm_list_all_enabled_users_to_send'] = false;
    484490
    485 // Max mails sended on one pass
     491// Max time used on one pass in order to send mails.
     492// Timeout delay ratio.
    486493$conf['nbm_max_treatment_timeout_percent'] = 0.8;
     494
     495// If timeout cannot be compite with nbm_max_treatment_timeout_percent,
     496// nbm_treatment_timeout_default is used by default
     497$conf['nbm_treatment_timeout_default'] = 20;
    487498
    488499// +-----------------------------------------------------------------------+
  • branches/branch-1_6/include/functions_mail.inc.php

    r1362 r1530  
    7979function format_email($name, $email)
    8080{
    81   $cvt7b_name = str_translate_to_ascii7bits($name);
     81  global $conf;
    8282
    83   if (strpos($email, '<') === false)
     83  if ($conf['enabled_format_email'])
    8484  {
    85     return $cvt7b_name.' <'.$email.'>';
     85    $cvt7b_name = str_translate_to_ascii7bits($name);
     86
     87    if (strpos($email, '<') === false)
     88    {
     89      return $cvt7b_name.' <'.$email.'>';
     90    }
     91    else
     92    {
     93      return $cvt7b_name.$email;
     94    }
    8695  }
    8796  else
    8897  {
    89     return $cvt7b_name.$email;
     98    return $email;
    9099  }
    91100}
     
    129138  if ($conf_mail['mail_options'])
    130139  {
    131     $options = '-f '.$from;
     140    $options = '-f '.$conf_mail['email_webmaster'];
    132141   
    133142    return mail($to, $cvt7b_subject, $content, $headers, $options);
  • branches/branch-1_6/password.php

    r1082 r1530  
    4343if (isset($_POST['submit']))
    4444{
    45   // in case of error, creation of mailto link
    46   $query = '
    47 SELECT '.$conf['user_fields']['email'].'
    48   FROM '.USERS_TABLE.'
    49   WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
    50 ;';
    51   list($mail_webmaster) = mysql_fetch_array(pwg_query($query));
    52 
    5345  $mailto =
    54     '<a href="mailto:'.$mail_webmaster.'">'
     46    '<a href="mailto:'.get_webmaster_mail_address().'">'
    5547    .l10n('Contact webmaster')
    5648    .'</a>'
     
    9385          ;
    9486
    95         if (pwg_mail($row['email'], $mail_webmaster, l10n('password updated'), $infos))
     87        if (pwg_mail($row['email'], '', l10n('password updated'), $infos))
    9688        {
    9789          $data =
Note: See TracChangeset for help on using the changeset viewer.