- 源码: xhadmincn/FastMovieAI (Apache 2.0) - 二开: Docker部署, Swoole改Select, route.php修复, 补update/VERSION - vendor/示例资源已gitignore
28 lines
491 B
PHP
28 lines
491 B
PHP
<?php
|
|
|
|
namespace app\expose\utils;
|
|
|
|
|
|
class Email
|
|
{
|
|
public $toemail;
|
|
protected $template;
|
|
protected $data;
|
|
public function setTemplate($template)
|
|
{
|
|
$this->template = new $template;
|
|
return $this;
|
|
}
|
|
public function setData($data)
|
|
{
|
|
$this->data = $data;
|
|
return $this;
|
|
}
|
|
public function send()
|
|
{
|
|
$content = $this->template->builder($this->toemail, $this->data);
|
|
p($content);
|
|
return true;
|
|
}
|
|
}
|