Vergleich inc/class_mailhandler.php - 1.8.8 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 33Zeile 33
	 * @var string
*/
public $from;

	 * @var string
*/
public $from;

 

/**
* Full from string including name in format "name" <email>
*
* @var string
*/
public $from_named;


/**
* Who the email should return to.


/**
* Who the email should return to.

	 *

	 *

	 * @var string
*/
public $return_email;

/**
* The subject of mail.

	 * @var string
*/
public $return_email;

/**
* The subject of mail.

	 *
* @var string

	 *
* @var string

	 */
public $subject;

	 */
public $subject;


/**


/**

	 * The unaltered subject of mail.
*
* @var string

	 * The unaltered subject of mail.
*
* @var string

Zeile 57Zeile 64

/**
* The message of the mail.


/**
* The message of the mail.

	 *
* @var string

	 *
* @var string

	 */
public $message;

	 */
public $message;


/**


/**

	 * The headers of the mail.
*
* @var string

	 * The headers of the mail.
*
* @var string

Zeile 71Zeile 78

/**
* The charset of the mail.


/**
* The charset of the mail.

	 *

	 *

	 * @var string
* @default utf-8
*/

	 * @var string
* @default utf-8
*/

Zeile 106Zeile 113
	public $code = 0;

/**

	public $code = 0;

/**

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


	 * Returns the appropriate email address based on the type.
*
* @param string $type The type of email address to return.
* @return string The selected email address.
*/
function get_email($type='from')

	{
global $mybb;

	{
global $mybb;

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

return $email;
}


	
if($type === 'reply-to')
{
if(isset($mybb->settings['returnemail']) && trim($mybb->settings['returnemail']))
{
return $mybb->settings['returnemail'];
}
}

// Fallback or 'from' case
return $mybb->settings['adminemail'];
}


	/**
* 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.

Zeile 150Zeile 158
		if($from)
{
$this->from = $from;

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

 
			$this->from_named = $this->from;

		}
else
{

		}
else
{

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

			$this->from = $this->get_email('from');
$this->from_named = '"'.$this->utf8_encode($mybb->settings['bbname']).'"';
$this->from_named .= " <".$this->from.">";







		}

if($return_email)

		}

if($return_email)

Zeile 170Zeile 173
		}
else
{

		}
else
{

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

			$this->return_email = $this->get_email('reply-to');


		}

$this->set_to($to);

		}

$this->set_to($to);

Zeile 312Zeile 314
		global $mybb;

// Build mail headers

		global $mybb;

// Build mail headers

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

		$this->headers .= "From: {$this->from_named}{$this->delimiter}";


if($this->return_email)
{


if($this->return_email)
{

Zeile 419Zeile 421
			{
$newpos = min($pos + $chunk_size, $len);


			{
$newpos = min($pos + $chunk_size, $len);


				while(ord($string[$newpos]) >= 0x80 && ord($string[$newpos]) < 0xC0)

				if($newpos != $len)

				{

				{

					// Reduce len until it's safe to split UTF-8.
$newpos--;




					while(ord($string[$newpos]) >= 0x80 && ord($string[$newpos]) < 0xC0)
{
// Reduce len until it's safe to split UTF-8.
$newpos--;
}

				}

$chunk = substr($string, $pos, $newpos - $pos);

				}

$chunk = substr($string, $pos, $newpos - $pos);