/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//发送成功
// $to = "xxx"; //收件人
// $subject = "Test"; //主题
// $message = "This is a test mail!"; //正文
// mail($to,$subject,$message);
//发送失败
$data = ['email' => 'xxx', 'name' => 'cdd', 'nickname' => "cd", 'mobile' => '177777', 'uid' => 1, 'activationcode' => rand(1, 1000)];
Mail::send('emails.welcome', $data, function ($message) use ($data) {
$message->from('xxxx', 'test');
// $message->attach($data['url'], $data);
$message->to($data['email'])->cc('xx')->subject("客户回馈");
});
}
0 个回复