PHP code example of tossboy / email

1. Go to this page and download the library: Download tossboy/email 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/ */

    

tossboy / email example snippets


use Email\Mail;
$email = new Mail($config=[
            'email' => $email,
            'password' => $password,
            'host' => '163',//163 qq ....
        ]);
$status = $email->sendMail('[email protected]','数据库备份提醒',date('Y-m-d H:i:s',time()).'备份成功');
var_dump($status);//成功返回true 失败返回错误信息