I have recently started working on a Laravel site, having never previously used Laravel before, and only having used PHP very briefly, about 9/10 years ago.
There is a form on one of the web pages, which displays information regarding transactions due to be made by various companies through our client's website. The form displays information such as name, ID, value of the transaction, contact email address, etc, and is used to send the companies reminders to pay those amounts.
All of the entries in the 'contact email address' column display a small pencil icon next to them, to allow the administrator to change the email address that the reminder will be sent to. When they click the pencil icon, a dialog box is opened showing the contact whose email address is currently set to receive the email, and giving the user the option to add a new contact to send the email to by filling out a small form.
The form contains fields for surname, forename & email address, and has a button to 'Add Contact'.
At the moment, when a user fills this form in, and clicks the 'Add Contact' button, an error message is displayed on the web page saying:
An error has occurred adding your contact. If the problem persists please contact us.
In the browser console, the Network tab shows an exceptionMessage
that says:
Connection could not be established with host mailtrap.io [Connection timed out #110] - /home/vagrant/.../StreamBuffer.php - 272
I came across this question on SO, about 'Connection timed out #110' error with Laravel on Localhost, and tried doing what the most upvoted answersuggested by changing my MAIL_HOST
from mailtrap.io
to smtp.mailtrap.io
, but this didn't seem to make a difference.
I also tried to see what value the MAIL_HOST
variable holds by adding a dd
into the method, as suggested in the accepted answer:
...
dd(env('MAIL_HOST'));
error => {
...
but I can't actually see that debug displayed in the console at all... it just shows:
Get http://mysite.test/.... 404 (Not Found)
Refused to execute script from provisional-reminders:1 'http://mysite.test/...' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
...
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://... with MIME type text/html.
Failed to load http://... provisional-reminders:1...: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mysite.test' is therefore not allowed access.
Error syncing with Cold Fusion Server error
GET http://mysite.test/... 404 (Not Found)
POST http://mysite.test/... 400 (Bad Request)
Error: [object Object]
POST http://mysite.test/... 400 (Bad Request)
Error: [object Object]
Anyone have any ideas why I'm getting this Connection could not be established with host mailtrap.io [Connection timed out #10]
error?