[geeklog-cvs] geeklog-1.3/public_html/admin mail.php,1.17,1.18 user.php,1.60,1.61

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Mon Sep 1 08:53:08 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory geeklog_prod:/tmp/cvs-serv23520/public_html/admin

Modified Files:
	mail.php user.php 
Log Message:
Introduced COM_mail() function and rewrote all functions that send emails to use COM_mail() instead of PHP's mail() function directly.


Index: mail.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/mail.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** mail.php	19 Jun 2003 20:01:41 -0000	1.17
--- mail.php	1 Sep 2003 12:53:06 -0000	1.18
***************
*** 123,152 ****
  	}
  
! 	// Header information
! 	$headers = "From: {$vars['fra']} <{$vars['fraepost']}>\r\n";
! 	$headers .= "X-Sender: <{$vars['fraepost']}>\r\n";
! 	$headers .= "X-Mailer: GeekLog " . VERSION . "\r\n"; // mailer
!     
! 	// Urgent message!
! 	if (isset($vars['priority'])) {
!  		$headers .= "X-Priority: 1\r\n";
! 	}
! 
! 	$headers .= "Return-Path: <{$vars['fraepost']}>\r\n";  // Return path for errors
!     if (empty ($LANG_CHARSET)) {
!         $charset = $_CONF['default_charset'];
!         if (empty ($charset)) {
!             $charset = "iso-8859-1";
!         }
      } else {
!         $charset = $LANG_CHARSET;
      }
  
! 	// If you want to send html mail
! 	if (isset($vars['html'])) { 
!  		$headers .= "Content-Type: text/html; charset=$charset\r\n"; // Mime type 
! 	} else {
!         $headers .= "Content-Type: text/plain; charset=$charset\r\n";
! 	}
  
  	// and now mail it
--- 123,139 ----
  	}
  
!     // Urgent message!
!     if (isset ($vars['priority'])) {
!         $priority = 1;
      } else {
!         $priority = 0;
      }
  
!     // If you want to send html mail
!     if (isset ($vars['html'])) { 
!         $html = true;
!     } else {
!         $html = false;
!     }
  
  	// and now mail it
***************
*** 179,189 ****
   		$til .= '<' . $A['email'] . '>';
   		$sendttil .= $til . '<br>';
!  
!  		if (!mail($A['email'], stripslashes ($vars['subject']),
!                 stripslashes ($vars['message']), $headers)) {
              $failures[] .= $til;
!  		} else {
              $successes[] = $til;
!  		}
  	}
  
--- 166,176 ----
   		$til .= '<' . $A['email'] . '>';
   		$sendttil .= $til . '<br>';
! 
!         if (!COM_mail ($A['email'], COM_stripslashes ($vars['subject']),
!                 COM_stripslashes ($vars['message']), '', $html, $priority)) {
              $failures[] .= $til;
!         } else {
              $successes[] = $til;
!         }
  	}
  

Index: user.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/user.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** user.php	21 Aug 2003 09:29:10 -0000	1.60
--- user.php	1 Sep 2003 12:53:06 -0000	1.61
***************
*** 514,518 ****
  function emailpassword($username)
  {
!     global $_TABLES, $_CONF, $LANG04, $LANG_CHARSET;
  
      $result = DB_query("SELECT email FROM {$_TABLES['users']} WHERE username = '$username'");
--- 514,518 ----
  function emailpassword($username)
  {
!     global $_CONF, $_TABLES, $LANG04;
  
      $result = DB_query("SELECT email FROM {$_TABLES['users']} WHERE username = '$username'");
***************
*** 532,550 ****
          $mailtext .= "{$_CONF["site_name"]}\n";
          $mailtext .= "{$_CONF['site_url']}\n";
!         if (empty ($LANG_CHARSET)) {
!             $charset = $_CONF['default_charset'];
!             if (empty ($charset)) {
!                 $charset = "iso-8859-1";
!             }
!         }
!         else {
!             $charset = $LANG_CHARSET;
!         }
!         mail($A["email"]
!             ,"{$_CONF["site_name"]}: {$LANG04[16]}"
!             ,$mailtext
!             ,"From: {$_CONF["site_name"]} <{$_CONF["site_mail"]}>\r\nReturn-Path: <{$_CONF["site_mail"]}>\r\nX-Mailer: GeekLog " . VERSION . "\r\nContent-Type: text/plain; charset={$charset}"
!             );
      }
      return $retval;
  }
--- 532,540 ----
          $mailtext .= "{$_CONF["site_name"]}\n";
          $mailtext .= "{$_CONF['site_url']}\n";
! 
!         $subject = $_CONF['site_name'] . ': ' . $LANG04[16];
!         COM_mail ($A['email'], $subject, $mailtext);
      }
+ 
      return $retval;
  }





More information about the geeklog-cvs mailing list