我正在使用的代码:
.ENV
APP_ENV=production
APP_DEBUG=true
APP_KEY=***************
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_DRIVER=mandrill
MANDRILL_SECRET=RVk7Ef8CRD-******
MAIL_HOST=smtp.mandrillapp.com
MAIL_USERNAME=*************
MAIL_PASSWORD=**************
MAIL_ENCRYPTION=ssl
MAIL_PORT=465
mail.php
<?php
return [
'driver' => env('MAIL_DRIVER', 'mandrill'),
'host' => env('MAIL_HOST', 'smtp.mandrillapp.com'),
'port' => env('MAIL_PORT', 465),
'from' => ['address' => 'rnytt1@mediadigital.no', 'name' => 'ParkogAnlegg Digital Magazine'],
'encryption'=> env('MAIL_ENCRYPTION', 'ssl'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
];
services.php
<?php
return [
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'mandrill' => [
'secret' => env('MANDRILL_SECRET')//zGvUgEUh9E6L2dyN7x7NDg
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
我没有收到错误消息或将电子邮件发送到我的系统的消息。
我将相同的配置集合到另一个应用程序中并在那里工作。但是,当我将相同的代码迁移到此应用程序时,它无法在此处运行。
任何帮助将不胜感激! 感谢
答案 0 :(得分:1)
您可能会错过在config/services.php
档案中工作
'mandrill' => [
'secret' => env('MANDRILL_SECRET')
],