mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
Add ability to specify subject within email, format is Subject: (localised subject) followed by carriage return/newline.
git-svn-id: file:///svn/phpbb/trunk@2235 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -71,9 +71,13 @@ class emailer
|
|||||||
//
|
//
|
||||||
// set up subject for mail
|
// set up subject for mail
|
||||||
//
|
//
|
||||||
function set_subject($subject)
|
function set_subject($subject = '')
|
||||||
{
|
{
|
||||||
$this->subject = $subject;
|
$match = array();
|
||||||
|
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
|
||||||
|
|
||||||
|
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : "";
|
||||||
|
$this->subject = ( $subject != '' ) ? $subject : trim($match[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user