Vergleich inc/class_mailhandler.php - 1.8.38 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 113Zeile 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

	
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 161Zeile 162
		}
else
{

		}
else
{

			$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.">";
}

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

Zeile 172Zeile 173
		}
else
{

		}
else
{

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

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

		}

$this->set_to($to);

		}

$this->set_to($to);