mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00: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:
parent
4256b8534d
commit
a54b016790
1 changed files with 6 additions and 2 deletions
|
@ -71,9 +71,13 @@ class emailer
|
|||
//
|
||||
// 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]);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue