Abstract: This paper describes the use laravel send mail flow and pit
Send e-mail: E-mail is best to give qq qq-mail sent, if 163 E-mail address to send mail qq, qq-mail will be treated as spam, if small partners successfully sent, did not receive the message, go to spam in review it.
1, to prepare 163 mailboxes, mailbox configuration modifications 163
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;//引用邮件的类
class LoginController extends Controller
{
public function email(){
//发送文字
Mail::raw('测试发送的内容',function($message){
$message->to('[email protected]');//发送地址
$message->subject('亲爱的用户,恭喜您注册成功');
});
}
}
According to the above steps, you can successfully send mail it, if there is a problem of small partners, can Comments, will be the first time I saw the reply.