|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:34:19
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11841/includes
Modified Files:
emailer.php
Log Message:
Combine emailer and smtp
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** emailer.php 29 Jun 2002 01:47:26 -0000 1.18
--- emailer.php 14 Jul 2002 14:34:16 -0000 1.19
***************
*** 92,101 ****
if ( !file_exists($this->tpl_file) )
{
! message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__);
}
if ( !$this->load_msg() )
{
! message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__);
}
--- 92,101 ----
if ( !file_exists($this->tpl_file) )
{
! message_die(ERROR, 'Could not find email template file ' . $template_file);
}
if ( !$this->load_msg() )
{
! message_die(ERROR, 'Could not load email template file ' . $template_file);
}
***************
*** 110,119 ****
if ( $this->tpl_file == NULL )
{
! message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
}
if ( !($fd = fopen($this->tpl_file, 'r')) )
{
! message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__);
}
--- 110,119 ----
if ( $this->tpl_file == NULL )
{
! message_die(ERROR, 'No template file set');
}
if ( !($fd = fopen($this->tpl_file, 'r')) )
{
! message_die(ERROR, 'Failed opening template file');
}
***************
*** 166,170 ****
if ( $this->address == NULL )
{
! message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
}
--- 166,170 ----
if ( $this->address == NULL )
{
! message_die(ERROR, 'No email address set');
}
***************
*** 184,188 ****
if ( !$result )
{
! message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__);
}
--- 184,188 ----
if ( !$result )
{
! message_die(ERROR, 'Failed sending email');
}
***************
*** 305,309 ****
if( !( $server_response = fgets($socket, 256) ) )
{
! message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", __LINE__, __FILE__);
}
}
--- 305,309 ----
if( !( $server_response = fgets($socket, 256) ) )
{
! message_die(ERROR, 'Could not get mail server response codes');
}
}
***************
*** 311,315 ****
if( !( substr($server_response, 0, 3) == $response ) )
{
! message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__);
}
}
--- 311,315 ----
if( !( substr($server_response, 0, 3) == $response ) )
{
! message_die(ERROR, "Ran into problems sending Mail. Response: $server_response");
}
}
***************
*** 379,393 ****
$bcc = explode(",", $bcc);
}
! if(trim($mail_to) == "")
{
! message_die(GENERAL_ERROR, "No email address specified", "", __LINE__, __FILE__);
}
! if(trim($subject) == "")
{
! message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__);
}
! if(trim($message) == "")
{
! message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__);
}
$mail_to_array = explode(",", $mail_to);
--- 379,393 ----
$bcc = explode(",", $bcc);
}
! if(trim($mail_to) == '')
{
! message_die(ERROR, 'No email address specified');
}
! if(trim($subject) == '')
{
! message_die(ERROR, 'No email Subject specified');
}
! if(trim($message) == '')
{
! message_die(ERROR, 'Email message was blank');
}
$mail_to_array = explode(",", $mail_to);
***************
*** 399,403 ****
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
! message_die(GENERAL_ERROR, "Could not connect to smtp host : $errno : $errstr", "", __LINE__, __FILE__);
}
server_parse($socket, "220");
--- 399,403 ----
if( !$socket = fsockopen($board_config['smtp_host'], 25, $errno, $errstr, 20) )
{
! message_die(ERROR, "Could not connect to smtp host : $errno : $errstr");
}
server_parse($socket, "220");
|