<?php

namespace App\Http\Controllers;

use App\Mail\Example;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use Yo;
use Lu;

class EmailController extends Controller
{
  public function email_test(Request $request)
  {
    $to = $request->post('to');
    $data = ['to' => $to, 'name' => '测试', 'date' => Lu::date()];
    Mail::to($to)->send(new Example($data));
    return Yo::echo();
  }
}
