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


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

指定的Mailgun Api文档 / YOURDOMAIN </ strong> </ p>

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



Answered my own question!

The Mailgun Api documentation specified

However, if you just use everything works fine!

Csdn user default icon