when I try to send an email with mailgun in laravel (i send by API not smtp) it gives me this error:
Could not reach the remote Mailgun server.
when I try to send an email with mailgun in laravel (i send by API not smtp) it gives me this error:
Could not reach the remote Mailgun server.
2
Answers
This is a blog example to setup a mailing list, but maybe it could give you an idea of how to send an email.
https://fperdomo.dev/blog/how-to-set-up-a-mailing-list-with-laravel-statamic-and-mailgun
The setup is the same. The only difference is that I used this to send the email:
You mentioned in a comment that you added your IP to the whitelist but did you add the server’s IP?
Your IP and your server’s IP might not be the same.
Also, did you try to send this email via a simple command line (bash curl or equivalent)?