#279 增加了邮件模板中标题的替换功能
This commit is contained in:
parent
0d1f51a6b2
commit
754320b7d2
|
@ -39,6 +39,11 @@ class EmailText{
|
||||||
$body=$this->tmpinfo['body'];
|
$body=$this->tmpinfo['body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($this->tmpinfo['subject']))
|
||||||
|
{
|
||||||
|
$this->getinfo();
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($body))
|
if(!empty($body))
|
||||||
{
|
{
|
||||||
if(count($this->data)==0)
|
if(count($this->data)==0)
|
||||||
|
@ -56,7 +61,8 @@ class EmailText{
|
||||||
}
|
}
|
||||||
ksort($patterns);
|
ksort($patterns);
|
||||||
ksort($replacements);
|
ksort($replacements);
|
||||||
$this->tmpinfo['body']=preg_replace($patterns, $replacements, $body);
|
$this->tmpinfo['body'] = preg_replace($patterns, $replacements, $body);
|
||||||
|
$this->tmpinfo['subject'] = preg_replace($patterns, $replacements, $this->tmpinfo['subject']);
|
||||||
return true;
|
return true;
|
||||||
}//count($this->data)
|
}//count($this->data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue