Laravel 5.8 - 无法使用邮件通过Mailgun发送电子邮件

I have spent three days trying to troubleshoot this and run out of ideas. I am trying to send an email using Mailgun, through Laravel 5.8, when directed to the log, it works fine, but when directed to Mailgun, there are no error messages, no email is sent, so obviously it is not received on the specified address, and nothing shows up in mailgun.

The code for sending is shown below.

Mail::to($validatedData['email_address'])->send(new ResetPassword ($account));

I have double checked the correct settings in the .ENV (changing this to log, sends it to the log, changing to Mailgun results in no log entry) so I know that is right.

Having purposely put an error in the ResetPassword mailable to make sure it throws and error, it does, so I know its finding that ok. The view being called exists (the text from the view, together with inserted data, appears in the log when directed there).

I am not using Queues.

The settings for mailgun have been double checked, and I have even regenerated the API key to make sure.

Everything looks right, and produces no error message when run, but no email is sent, can anyone suggest what is going wrong?

dpfln86244
dpfln86244 嗨,是的,都试过了,两者都没有任何区别。如下所述,Mailgun文档中的APIURL不正确导致了问题。
大约一年之前 回复
doumeng1089
doumeng1089 请尝试phpartisanconfig:clear和phpartisancache:清除然后运行你的代码。
大约一年之前 回复

1个回答



回答了我自己的问题!</ p>

指定的Mailgun Api文档api.mailgun.com/v3 / YOURDOMAIN </ strong> </ p>

但是,如果你只是使用api.mailgun.com,一切正常!</ p>
</ div>

展开原文

原文

Answered my own question!

The Mailgun Api documentation specified api.mailgun.com/v3/YOURDOMAIN

However, if you just use api.mailgun.com everything works fine!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐