Skip to content

draguo/directmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

阿里云发送邮件

安装

    composer require draguo/directmail

使用

$body = "<h1>这是标题</h1>";
$mail = new \Draguo\DirectMail\DirectMail($accessKey, $secret);
$result = $mail->send([
    'from' => '', // 发信地址 AccountName
    'to' => '', // 多个地址可用逗号分隔,最多100个
    'name' => '', // 发件人昵称  FromAlias
    'subject' => '这个是邮件的主题', // Subject
    'body' => $body, // html or text
    'trace' => '' // 是否开启数据追踪功能, 1 或 0
]);

echo $result;