[Comoblog-commit] modules/mod_comment_notify mod_comment_notify_comment_filter.php,1.1,1.2
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2005-12-11 22:35:23
|
Update of /cvsroot/comoblog/modules/mod_comment_notify In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30633/mod_comment_notify Modified Files: mod_comment_notify_comment_filter.php Log Message: now uses the built in php mail function instead of the pair library, ive confirm that this module works, on fedora core 2 - and fedora core 4 can any one check it works on a windows server ? if it does ill remove the obsolite code. Index: mod_comment_notify_comment_filter.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_comment_notify/mod_comment_notify_comment_filter.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_comment_notify_comment_filter.php 28 Nov 2005 10:41:39 -0000 1.1 +++ mod_comment_notify_comment_filter.php 11 Dec 2005 22:35:15 -0000 1.2 @@ -1,20 +1,29 @@ <?php - -include('include/pear/Mail.php'); +#include('include/pear/Mail.php'); require_once(dirname(__FILE__).'/include/mod_comment_notify.inc.php'); -$subject = mod_comment_notify($comment['post_id']); +$subject ='Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']); $body = "Message details " . "\n\n"; $body .= "Post ID:" . $comment['post_id'] ."\n"; $body .= "Link: " .CFG_SITE_URL. "post.php?/". $comment['post_id'] ."\n"; $body .= "From:" . $comment['comment_author'] . " - " . $comment['comment_author_email'] ."\n"; $body .= "Comment:\n\n" . $comment['comment_text'] ."\n"; $recipients = CFG_COMMENT_NOTIFY_TO; -$headers['From'] = CFG_COMMENT_NOTIFY_FROM; -$headers['To'] = CFG_COMMENT_NOTIFY_TO; -$headers['Subject'] = 'Blog Comment Added To Post - ' .$subject; -$params['sendmail_path'] = CFG_WHERE_IS_SENDMAIL; + + +$headerstring = "MIME-Version: 1.0\r\n". + "Content-type: text/plain; charset=iso-8859-1\r\n". + "From: \"My Name\" <".CFG_COMMENT_NOTIFY_FROM.">\r\n". + "To: \"Client\" <".$recipients.">\r\n". + "Date: ".date("r")."\r\n". + "Subject: ".$subject."\r\n"; + +mail($recipients, $subject, $body,$headerstring); + +#$headers['From'] = CFG_COMMENT_NOTIFY_FROM; +#$headers['To'] = CFG_COMMENT_NOTIFY_TO; +#$headers['Subject'] = $subject; +#$params['sendmail_path'] = CFG_WHERE_IS_SENDMAIL; // Create the mail object using the Mail::factory method -$mail_object =& Mail::factory('sendmail', $params);$mail_object->send($recipients, $headers, $body); - +#$mail_object =& Mail::factory('sendmail', $params);$mail_object->send($recipients, $headers, $body); ?> \ No newline at end of file |