Documentation

Mail.php

配置

$config['mail_from'] = "帐号@域名"; $config['mail_smtp'] = 'smtp.mxhichina.com'; $config['mail_pwd'] = '密码'; $config['mail_port'] = '465'; //465时可不填写

发送邮件 \lib\Mail::send([ 'from' => '', 'replyTo'=>'reply to this address', 'to' => 'your mail address', 'subject'=> "邮件标题", 'html' => "邮件内容", 'addPart'=> [ ['path'=>PATH.'/uploads/demo.pdf','name'=>'test.pdf'], ['path'=>PATH.'/uploads/demo.docx','name'=>'test1.docx'], ], ]); 更多用法: https://symfony.com/doc/current/mailer.html#html-content

Table of Contents

Classes

Mail
发送邮件 composer require symfony/mailer https://symfony.com/components/Mailer

        
On this page

Search results