Chapter 16: Command-Line PHP Utilities 577 Content-Type: text/htmlrn );

Chapter 16: Command-Line PHP Utilities 577 Content-Type: text/htmlrn ); } else { array_push($headers, Content-Type: text/plainn ); } $contentTypeSet = TRUE; } else if (preg_match( /MIME-Version:s*(.+)/i , $str, $match ) ) { array_push($headers, MIME-Version: $match[1] rn ); } else { array_push($message, $str); } } if (! $contentTypeSet) array_push($headers, Content-Type: text/plainrn ); $subject = preg_replace( /<%TODAY%>/i , $today, $subject); $body = implode( , $message); $body = preg_replace( /<%TODAY%>/i , $today, $body); $headerStr = implode( , $headers); if (DEBUG) echo Sending mail to: $to (subject: $subject)n ; return mail($to, $subject, $body, $headerStr); } function getRemindersForToday($list = null, $logFile = null) { Continued

Leave a Reply