PHP code example of yzh52521 / webman-mailer

1. Go to this page and download the library: Download yzh52521/webman-mailer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yzh52521 / webman-mailer example snippets


$mailer->send(
    function ($message) {
         $mailer->setFrom(''[email protected]')
           ->setTo('[email protected]')
           ->setSubject('测试邮件')
           ->setTextBody('测试内容');
            },
            [
                'scheme'=>'',
                'host'     => '', // 服务器地址
                'username' => '', //用户名
                'password' => '', // 密码
                'port'     => 465, // SMTP服务器端口号,一般为25
            ]
            );