Changeset 722

Show
Ignore:
Timestamp:
08/15/2007 11:59:13 AM (3 years ago)
Author:
JavaWoman
Message:

small tweaks to feedback action:

  • improved splitting of admins list in config
  • retrieve admin email from DB rather than from config (DB is more likely to be current)
  • suppress "manual" addition of To: header since PHP (or MTA?) adds the envelope-to also to the headers and some mail servers don't filter duplicate mails to the same address


refs #547

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/feedback/feedback.php

    r713 r722  
    128128                //default recipient is admin 
    129129                default: 
    130                         $admins = preg_split('/\s*,\s*/',trim($this->GetConfigValue('admin_users'))); 
    131                         $recipient_name = $admins[0]; 
    132                         $recipient_email = $this->GetConfigValue('admin_email'); 
     130                        $adminarray = preg_split('/\s*,\s*/',trim($this->GetConfigValue('admin_users')), -1, PREG_SPLIT_NO_EMPTY); 
     131                        $recipient_name = $adminarray[0]; 
     132                        $admin = $this->loadUserData($this->tag); 
     133                        $recipient_email = $admin['admin_email'];       // get email from DB rather than config! 
    133134                        $b_admin = TRUE; 
    134135                        break; 
     
    205206                        $msg .= FEEDBACK_EMAIL_LABEL."\t".$sender_email.$eol; 
    206207                        $msg .= $eol.$comments.$eol; 
    207                         $add_headers .= 'To: '.$recipient.$eol;                 // adding full address 
     208                        #$add_headers .= 'To: '.$recipient.$eol;                        // adding full address - may lead to duplicate mails: suppressing for now 
    208209                        $add_headers .= 'From: '.$sender.$eol;                  // adding full address 
    209210                        $add_headers .= 'Reply-To: '.$sender.$eol;              // adding full address