|
From: Nathan C. <na...@us...> - 2001-11-26 00:50:06
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv15842/includes
Modified Files:
emailer.php smtp.php
Log Message:
Fixed bug 481943. Regexp that normalized linebreaks to \r\n was fucked, so it was changing (char)\n to \r\n and dropping (char). Hence we lost the char before every single linebreak in every email sent thru SMTP. yay. ALso fixed so it gets the FROM address from the right place.
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** emailer.php 2001/11/13 16:07:42 1.8
--- emailer.php 2001/11/26 00:50:03 1.9
***************
*** 172,178 ****
function send()
{
! global $phpEx;
! $phpbb_root_path = "./";
if ($this->address == NULL)
--- 172,186 ----
function send()
{
! global $phpEx, $phpbb_root_dir;
! if (isset($phpbb_root_dir))
! {
! // we must be in the admin section.
! $phpbb_root_path = $phpbb_root_dir;
! }
! else
! {
! $phpbb_root_path = "./";
! }
if ($this->address == NULL)
Index: smtp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/smtp.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** smtp.php 2001/08/30 22:20:23 1.4
--- smtp.php 2001/11/26 00:50:03 1.5
***************
*** 42,46 ****
if(!(substr($server_response, 0, 3) == $response))
{
! message_die(GENERAL_ERROR, "Ran into problems sending Mail", "", __LINE__, __FILE__);
}
}
--- 42,46 ----
if(!(substr($server_response, 0, 3) == $response))
{
! message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__);
}
}
***************
*** 64,68 ****
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
//
! $message = ereg_replace("[^\r]\n", "\r\n", $message);
if ($headers != "")
--- 64,68 ----
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
//
! $message = preg_replace("/(?<!\r)\n/si", "\r\n", $message);
if ($headers != "")
***************
*** 82,86 ****
// Make sure there are no bare linefeeds in the headers
! $headers = ereg_replace("[^\r]\n", "\r\n", $headers);
}
if(trim($mail_to) == "")
--- 82,86 ----
// Make sure there are no bare linefeeds in the headers
! $headers = preg_replace("/(?<!\r)\n/si", "\r\n", $headers);
}
if(trim($mail_to) == "")
***************
*** 115,119 ****
// Specify who the mail is from....
! fputs($socket, "MAIL FROM: $email_from\r\n");
server_parse($socket, "250");
--- 115,119 ----
// Specify who the mail is from....
! fputs($socket, "MAIL FROM: " . $board_config['board_email'] . "\r\n");
server_parse($socket, "250");
|