Vergleich inc/class_mailhandler.php - 1.8.6 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 35Zeile 35
	public $from;

/**

	public $from;

/**

	 * Who the email should return to.

	 * Full from string including name in format "name" <email>

	 *

	 *

	 * @var string
*/








	 * @var string
*/
public $from_named;

/**
* Who the email should return to.
*
* @var string
*/

	public $return_email;

/**

	public $return_email;

/**

Zeile 47Zeile 54
	 * @var string
*/
public $subject;

	 * @var string
*/
public $subject;


/**


/**

	 * The unaltered subject of mail.

	 * The unaltered subject of mail.

	 *
* @var string

	 *
* @var string

	 */
public $orig_subject;

/**
* The message of the mail.

	 */
public $orig_subject;

/**
* The message of the mail.

	 *
* @var string
*/

	 *
* @var string
*/

	public $message;

	public $message;





	/**
* The headers of the mail.
*

	/**
* The headers of the mail.
*

Zeile 71Zeile 78

/**
* The charset of the mail.


/**
* The charset of the mail.

	 *
* @var string

	 *
* @var string

	 * @default utf-8

	 * @default utf-8

	 */

	 */

	public $charset = "utf-8";

/**

	public $charset = "utf-8";

/**

Zeile 83Zeile 90
	 * @var string
*/
public $delimiter = "\r\n";

	 * @var string
*/
public $delimiter = "\r\n";


/**


/**

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

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

	 *















	 *
* @var string
*/
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
*/

	 * @var string
*/

	public $parse_format = 'text';

	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

	
if($type === 'reply-to')





		{

		{

			$email = $mybb->settings['adminemail'];




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

		}

		}

		
return $email;
}


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


/**
* Builds the whole mail.


/**
* Builds the whole mail.

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

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

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

		}
else
{

		}
else
{

			$this->from = "";
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 157Zeile 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 299Zeile 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 406Zeile 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);