gpt4 book ai didi

laravel - 在laravel上找不到404邮件枪域

转载 作者:行者123 更新时间:2023-12-03 16:12:39 26 4
gpt4 key购买 nike

我实际上在laravel上与mailgun斗争,我在laravel 6上,我已经设置了auth并试图使密码重置功能正常工作。所以我决定使用mailgun作为电子邮件服务器,

这是我的.env文件:

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:************
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=******
DB_USERNAME=******
DB_PASSWORD=******

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster@parisworld.ovh
MAIL_PASSWORD=*******
MAIL_ENCRYPTION=tls

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"


mail.php:
<?php

return [
'driver' => env('MAIL_DRIVER', 'mailgun'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'support@parisworld.ovh'),
'name' => env('MAIL_FROM_NAME', 'Parisworld support'),
],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',

'paths' => [
resource_path('views/vendor/mail'),
],
],
'log_channel' => env('MAIL_LOG_CHANNEL'),
]

和我的services.php:
<?php

return [
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN', 'parisworld.ovh'),
'secret' => env('MAILGUN_SECRET', '********'),
],

'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],

'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

];

我没有得到我真正缺少的东西,我配置了mailgun域并验证了dns,在mailgun方面一切正常,我什至可以使用curl方法向自己发送邮件,但是当我尝试从我的密码中重置密码时应用我收到此错误:
Client error: `POST https://api.mailgun.net/v3/parisworld.ovh/messages.mime` resulted in a `404 NOT FOUND` response: { "message": "Domain not found: parisworld.ovh" } 

我希望这篇文章很清楚,欢迎任何想法:)

最佳答案

  • 在Mailgun域页面上(例如https://app.eu.mailgun.com/app/sending/domains)获取您的域区域;
  • 检查域名设置-> DNS记录;
  • 编辑.env文件:

  • .env文件
    MAIL_DRIVER=mailgun
    MAILGUN_DOMAIN=mg.docm****.***
    MAILGUN_SECRET=d76da6b39e********

    # For EU Mailgun domain region
    MAILGUN_ENDPOINT=api.eu.mailgun.net

    # For US Mailgun domain region
    MAILGUN_ENDPOINT=api.mailgun.net

    有关端点 https://documentation.mailgun.com/en/latest/api-intro.html#mailgun-regions的更多信息

    Mailgun: Domains page

    Mailgun: Domain Settings -> DNS records

    Mailgun: Domain Settings -> DNS records 2

    关于laravel - 在laravel上找不到404邮件枪域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58173388/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com