Vergleich inc/class_mailhandler.php - 1.8.0 - 1.8.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 80Zeile 80
	/**
* The currently used delimiter new lines.
*

	/**
* The currently used delimiter new lines.
*

	 * @var string.

	 * @var string

	 */
public $delimiter = "\r\n";

/**
* How it should parse the email (HTML or plain text?)
*

	 */
public $delimiter = "\r\n";

/**
* How it should parse the email (HTML or plain text?)
*

	 * @var array

	 * @var string

	 */
public $parse_format = 'text';

	 */
public $parse_format = 'text';

 

/**
* The last received response from the SMTP server.
*
* @var string
*/
public $data = '';

/**
* The last received response code from the SMTP server.
*
* @var string
*/
public $code = 0;

/**
* Selects between AdminEmail and ReturnEmail, dependant on if ReturnEmail is filled.
*
* @return string
*/
function get_from_email()
{
global $mybb;

if(trim($mybb->settings['returnemail']))
{
$email = $mybb->settings['returnemail'];
}
else
{
$email = $mybb->settings['adminemail'];
}

return $email;
}


/**
* Builds the whole mail.
* To be used by the different email classes later.
*


/**
* Builds the whole mail.
* To be used by the different email classes later.
*

	 * @param string to email.
* @param string subject of email.
* @param string message of email.
* @param string from email.
* @param string charset of email.
* @param string headers of email.
* @param string format of the email (HTML, plain text, or both?).
* @param string plain text version of the email.
* @param string the return email address.

	 * @param string $to to email.
* @param string $subject subject of email.
* @param string $message message of email.
* @param string $from from email.
* @param string $charset charset of email.
* @param string $headers headers of email.
* @param string $format format of the email (HTML, plain text, or both?).
* @param string $message_text plain text version of the email.
* @param string $return_email the return email address.

	 */
function build_message($to, $subject, $message, $from="", $charset="", $headers="", $format="text", $message_text="", $return_email="")
{

	 */
function build_message($to, $subject, $message, $from="", $charset="", $headers="", $format="text", $message_text="", $return_email="")
{

Zeile 111Zeile 146

$this->message = '';
$this->headers = $headers;


$this->message = '';
$this->headers = $headers;



		

		if($from)
{
$this->from = $from;

		if($from)
{
$this->from = $from;

		}

		}

		else
{
$this->from = "";

		else
{
$this->from = "";



 
			if($mybb->settings['mail_handler'] == 'smtp')
{

			if($mybb->settings['mail_handler'] == 'smtp')
{

				$this->from = $mybb->settings['adminemail'];

				$this->from = $this->get_from_email();

			}
else
{
$this->from = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';

			}
else
{
$this->from = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';

				$this->from .= " <{$mybb->settings['adminemail']}>";

				$this->from .= " <".$this->get_from_email().">";

			}
}

if($return_email)

			}
}

if($return_email)

		{

		{

			$this->return_email = $return_email;
}
else
{
$this->return_email = "";

			$this->return_email = $return_email;
}
else
{
$this->return_email = "";

			if($mybb->settings['returnemail'])
{
$this->return_email = $mybb->settings['returnemail'];
}
else
{
$this->return_email = $mybb->settings['adminemail'];
}

			$this->return_email = $this->get_from_email();








		}

$this->set_to($to);

		}

$this->set_to($to);

Zeile 164Zeile 191
	/**
* Sets the charset.
*

	/**
* Sets the charset.
*

	 * @param string charset

	 * @param string $charset charset

	 */
function set_charset($charset)
{

	 */
function set_charset($charset)
{

Zeile 183Zeile 210
	/**
* Sets and formats the email message.
*

	/**
* Sets and formats the email message.
*

	 * @param string message


	 * @param string $message message
* @param string $message_text

	 */
function set_message($message, $message_text="")
{

	 */
function set_message($message, $message_text="")
{

Zeile 208Zeile 236
	/**
* Sets and formats the email subject.
*

	/**
* Sets and formats the email subject.
*

	 * @param string subject

	 * @param string $subject

	 */
function set_subject($subject)
{

	 */
function set_subject($subject)
{

Zeile 219Zeile 247
	/**
* Sets and formats the recipient address.
*

	/**
* Sets and formats the recipient address.
*

	 * @param string to

	 * @param string $to

	 */
function set_to($to)
{

	 */
function set_to($to)
{

Zeile 239Zeile 267
	/**
* Sets the alternative headers, text/html and text/plain.
*

	/**
* Sets the alternative headers, text/html and text/plain.
*

	 * @param string message


	 * @param string $message
* @param string $message_text

	 */
function set_html_headers($message, $message_text="")
{

	 */
function set_html_headers($message, $message_text="")
{

Zeile 320Zeile 349
	/**
* Log a fatal error message to the database.
*

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

	 * @param string The error message
* @param string Any additional information

	 * @param string $error The error message


	 */
function fatal_error($error)
{

	 */
function fatal_error($error)
{

Zeile 345Zeile 373
	/**
* Rids pesky characters from subjects, recipients, from addresses etc (prevents mail injection too)
*

	/**
* Rids pesky characters from subjects, recipients, from addresses etc (prevents mail injection too)
*

	 * @param string The string being checked

	 * @param string $string The string being checked

	 * @return string The cleaned string
*/
function cleanup($string)

	 * @return string The cleaned string
*/
function cleanup($string)

Zeile 359Zeile 387
	 * Converts message text to suit the correct delimiter
* See dev.mybb.com/issues/1735 (Jorge Oliveira)
*

	 * Converts message text to suit the correct delimiter
* See dev.mybb.com/issues/1735 (Jorge Oliveira)
*

	 * @param string The text being converted

	 * @param string $text The text being converted

	 * @return string The converted string
*/
function cleanup_crlf($text)

	 * @return string The converted string
*/
function cleanup_crlf($text)

Zeile 376Zeile 404
	 * and recipients in email messages going out so that they show up correctly
* in email clients.
*

	 * and recipients in email messages going out so that they show up correctly
* in email clients.
*

	 * @param string The string to be encoded.

	 * @param string $string The string to be encoded.

	 * @return string The encoded string.
*/
function utf8_encode($string)

	 * @return string The encoded string.
*/
function utf8_encode($string)