我需要composer require illuminate/mail
,
.env
看起来不错:
MAIL_DRIVER=smtp
MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=******@hotmail.com
MAIL_PASSWORD=*****
MAIL_ENCRYPTION=tls
控制器:
use Illuminate\Support\Facades\Mail;
....
....
....
$random = str_random(40);
Mail::send('email.verify', ['user' => $applicant_id, 'random'=>$random], function ($m) use ($findUser) {
$m->to($findUser->user->email)->subject('Account Verification');
});
它总是给我"message": "Maximum execution time of 30 seconds exceeded",
,我也尝试过zoho邮件。