[Bb-trac] Re: [bbPress] #749: bb_mail fails to sent mail

bbPress bb-trac at lists.bbpress.org
Sat Oct 6 18:52:40 GMT 2007


#749: bb_mail fails to sent mail
----------------------------+-----------------------------------------------
 Reporter:  snakefoot       |        Owner:               
     Type:  defect          |       Status:  new          
 Priority:  normal          |    Milestone:  0.8.4 & Pings
Component:  Administration  |      Version:  0.8.3        
 Severity:  normal          |   Resolution:               
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by snakefoot):

 Whoops correct way:
 {{{
 function bb_mail( $to, $subject, $message, $headers = '' ) {
         $headers = trim($headers);
         if ( !preg_match( '/^from:\s/im', $headers ) ) {
                 if (!empty($headers))
                         $headers .= '\r\n';
                 $headers .= 'From: ' . bb_get_option('admin_email');
                 $headers = trim($headers);
         }

         return @mail( $to, $subject, $message, $headers );
 }
 }}}

-- 
Ticket URL: <http://trac.bbpress.org/ticket/749#comment:1>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list