Vergleich inc/class_mailhandler.php - 1.6.6 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: class_mailhandler.php 5589 2011-09-13 15:08:11Z Tomm $

 * $Id$

 */

/**

 */

/**

Zeile 187Zeile 187
	 * @param string message
*/
function set_message($message, $message_text="")

	 * @param string message
*/
function set_message($message, $message_text="")

	{		








	{
$message = $this->cleanup_crlf($message);

if($message_text)
{
$message_text = $this->cleanup_crlf($message_text);
}


		if($this->parse_format == "html" || $this->parse_format == "both")
{
$this->set_html_headers($message, $message_text);

		if($this->parse_format == "html" || $this->parse_format == "both")
{
$this->set_html_headers($message, $message_text);

Zeile 267Zeile 274
			$this->headers .= "Content-Type: text/html; charset=\"{$this->charset}\"{$this->delimiter}";
$this->headers .= "Content-Transfer-Encoding: 8bit{$this->delimiter}{$this->delimiter}";
$this->message = $message."{$this->delimiter}{$this->delimiter}";

			$this->headers .= "Content-Type: text/html; charset=\"{$this->charset}\"{$this->delimiter}";
$this->headers .= "Content-Transfer-Encoding: 8bit{$this->delimiter}{$this->delimiter}";
$this->message = $message."{$this->delimiter}{$this->delimiter}";

		}

		}

	}

/**

	}

/**

Zeile 275Zeile 282
	 */
function set_common_headers()
{

	 */
function set_common_headers()
{

 
		global $mybb;


		// Build mail headers
$this->headers .= "From: {$this->from}{$this->delimiter}";


		// Build mail headers
$this->headers .= "From: {$this->from}{$this->delimiter}";


Zeile 287Zeile 296
		if(isset($_SERVER['SERVER_NAME']))
{
$http_host = $_SERVER['SERVER_NAME'];

		if(isset($_SERVER['SERVER_NAME']))
{
$http_host = $_SERVER['SERVER_NAME'];

		}

		}

		else if(isset($_SERVER['HTTP_HOST']))
{
$http_host = $_SERVER['HTTP_HOST'];

		else if(isset($_SERVER['HTTP_HOST']))
{
$http_host = $_SERVER['HTTP_HOST'];

Zeile 295Zeile 304
		else
{
$http_host = "unknown.local";

		else
{
$http_host = "unknown.local";

		}

		}


$msg_id = md5(uniqid(TIME_NOW)) . "@" . $http_host;



$msg_id = md5(uniqid(TIME_NOW)) . "@" . $http_host;


Zeile 305Zeile 314
		}
$this->headers .= "Content-Transfer-Encoding: 8bit{$this->delimiter}";
$this->headers .= "X-Priority: 3{$this->delimiter}";

		}
$this->headers .= "Content-Transfer-Encoding: 8bit{$this->delimiter}";
$this->headers .= "X-Priority: 3{$this->delimiter}";

		$this->headers .= "X-MSMail-Priority: Normal{$this->delimiter}";

 
		$this->headers .= "X-Mailer: MyBB{$this->delimiter}";
$this->headers .= "MIME-Version: 1.0{$this->delimiter}";

		$this->headers .= "X-Mailer: MyBB{$this->delimiter}";
$this->headers .= "MIME-Version: 1.0{$this->delimiter}";

	}

	}

	
/**
* Log a fatal error message to the database.

	
/**
* Log a fatal error message to the database.

Zeile 347Zeile 355
		$string = trim($string);
return $string;
}

		$string = trim($string);
return $string;
}

	


















/**
* Converts message text to suit the correct delimiter
* See dev.mybb.com/issues/1735 (Jorge Oliveira)
*
* @param string The text being converted
* @return string The converted string
*/
function cleanup_crlf($text)
{
$text = str_replace("\r\n", "\n", $text);
$text = str_replace("\r", "\n", $text);
$text = str_replace("\n", "\r\n", $text);

return $text;
}


	/**
* Encode a string based on the character set enabled. Used to encode subjects
* and recipients in email messages going out so that they show up correctly

	/**
* Encode a string based on the character set enabled. Used to encode subjects
* and recipients in email messages going out so that they show up correctly