Set Reply-to
Email Core_Email::reply_to( string $replyto [, string $name = empty ] )
参数列表
参数 类型 描述 默认值 $replyto
string
$name
string
empty
Email
public function reply_to($replyto, $name = '')
{
if (preg_match('/\<(.*)\>/', $replyto, $match))
{
$replyto = $match[1];
}
if ($this->validate)
{
$this->validate_email($this->_str_to_array($replyto));
}
if ($name === '')
{
$name = $replyto;
}
if (strpos($name, '"') !== 0)
{
$name = '"'.$name.'"';
}
$this->set_header('Reply-To', $name.' <'.$replyto.'>');
$this->_replyto_flag = true;
return $this;
}