diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-14 14:34:16 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-14 14:34:16 +0000 |
commit | 72db8c4a5e058db14b7a5e703cf01503a906463d (patch) | |
tree | f2ac035b0d9846358924d4c69bb515fc008ce39c /phpBB/includes | |
parent | a0ee4ce6ae2bca41e99b3631c83dbc567ad3bfae (diff) | |
download | forums-72db8c4a5e058db14b7a5e703cf01503a906463d.tar forums-72db8c4a5e058db14b7a5e703cf01503a906463d.tar.gz forums-72db8c4a5e058db14b7a5e703cf01503a906463d.tar.bz2 forums-72db8c4a5e058db14b7a5e703cf01503a906463d.tar.xz forums-72db8c4a5e058db14b7a5e703cf01503a906463d.zip |
Combine emailer and smtp
git-svn-id: file:///svn/phpbb/trunk@2663 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rwxr-xr-x | phpBB/includes/emailer.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index e2e2241f87..c52b2df0dc 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -91,12 +91,12 @@ class emailer $this->tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; if ( !file_exists($this->tpl_file) ) { - message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__); + message_die(ERROR, 'Could not find email template file ' . $template_file); } if ( !$this->load_msg() ) { - message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__); + message_die(ERROR, 'Could not load email template file ' . $template_file); } return true; @@ -109,12 +109,12 @@ class emailer { if ( $this->tpl_file == NULL ) { - message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__); + message_die(ERROR, 'No template file set'); } if ( !($fd = fopen($this->tpl_file, 'r')) ) { - message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__); + message_die(ERROR, 'Failed opening template file'); } $this->msg .= fread($fd, filesize($this->tpl_file)); @@ -165,7 +165,7 @@ class emailer if ( $this->address == NULL ) { - message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__); + message_die(ERROR, 'No email address set'); } if ( !$this->parse_email() ) @@ -183,7 +183,7 @@ class emailer if ( !$result ) { - message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__); + message_die(ERROR, 'Failed sending email'); } return true; @@ -304,13 +304,13 @@ function server_parse($socket, $response) { if( !( $server_response = fgets($socket, 256) ) ) { - message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", __LINE__, __FILE__); + message_die(ERROR, 'Could not get mail server response codes'); } } if( !( substr($server_response, 0, 3) == $response ) ) { - message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__); + message_die(ERROR, "Ran into problems sending Mail. Response: $server_response"); } } @@ -378,17 +378,17 @@ function smtpmail($mail_to, $subject, $message, $headers = '') $cc = explode(",", $cc); $bcc = explode(",", $bcc); } - if(trim($mail_to) == "") + if(trim($mail_to) == '') { - message_die(GENERAL_ERROR, "No email address specified", "", __LINE__, __FILE__); + message_die(ERROR, 'No email address specified'); } - if(trim($subject) == "") + if(trim($subject) == '') { - message_die(GENERAL_ERROR, "No email Subject specified", "", __LINE__, __FILE__); + message_die(ERROR, 'No email Subject specified'); } - if(trim($message) == "") + if(trim($message) == '') { - message_die(GENERAL_ERROR, "Email message was blank", "", __LINE__, __FILE__); + message_die(ERROR, 'Email message was blank'); } $mail_to_array = explode(",", $mail_to); @@ -398,7 +398,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '') // 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__); + message_die(ERROR, "Could not connect to smtp host : $errno : $errstr"); } server_parse($socket, "220"); |