Php Laravel 5.8通过邮枪发送邮件无效

Php Laravel 5.8通过邮枪发送邮件无效,php,laravel,email,laravel-5.8,mailgun,Php,Laravel,Email,Laravel 5.8,Mailgun,我正在使用Laravel5.8,我已经设置了我的邮枪,并验证了我的子域 我可以通过curl发送邮件,但我不能通过Laravel应用发送邮件 我的服务文件 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN', 'https://api.mailgun.net/v3/mg.*************.com'), 'secret' => env('MAILGUN_SECRET', 'MY_MAILGUN_API_KEY')

我正在使用Laravel5.8,我已经设置了我的邮枪,并验证了我的子域

我可以通过curl发送邮件,但我不能通过Laravel应用发送邮件

我的服务文件

'mailgun' => [
    'domain' => env('MAILGUN_DOMAIN', 'https://api.mailgun.net/v3/mg.*************.com'),
    'secret' => env('MAILGUN_SECRET', 'MY_MAILGUN_API_KEY'),
    'endpoint' => 'api.mailgun.net',
],
My.env

MAILGUN_SECRET=MY_MAILGUN_API_KEY
MAILGUN_DOMAIN=https://api.mailgun.net/v3/mg.*************.com
邮件文件夹中的我的邮件文件

<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class VisaBooking extends Mailable
{
use Queueable, SerializesModels;

public $visa;

/**
 * Create a new message instance.
 *
 * @return void
 */
public function __construct($visa)
{
    $this->visa = $visa;
}

/**
 * Build the message.
 *
 * @return $this
 */
public function build()
{
    return $this->from('mailgun@mg.********.com')
    ->subject('New Visa Request')
    ->markdown('mails.visa');
}
}
Mail::to('joshymajebi@gmail.com')->send(new VisaBookingMail(['created_at' => $now, 'updated_at' => $now, 'destinations_country' => $destinations_country, 'residence_country' => $residence_country, 'prefix' => $prefix, 'lastname' => $lastname, 'firstname' => $firstname, 'middlename' => $middlename, 'phone_number' => $phone_number, 'email' => $email, 'departing' => $d_date, 'returning' => $r_date, 'passport_number' => $passport_number, 'passport_expiry_date' => $p_date, 'passport_issuing_authority' => $passport_issuing_authority]));

我不会在收件箱或垃圾邮件中收到邮件,在我的邮枪日志中也不会显示

检查您的laravel日志或电子邮件中的垃圾邮件文件夹。日志中没有显示任何内容。就像我说的垃圾邮件文件夹不包含任何内容。你能从你的邮枪设置中删除端点字段吗?所以只保留域名和秘密。然后运行
php artisan optimize
,以确保您的环境值是最新的。