Any resolution to this one? testing in sandbox mode would only make sense to test via a localhost domain I would of thought. if anyone could shed any light on this one.
thanks,
Michael
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
When I try to use my Mailgun sandbox to send an email I see the following error:
Client error: `POST https://api.mailgun.net/v3/sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org/messages.mime` resulted in a `400 BAD REQUEST` response:
{
"message": "Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authoriz (truncated...)
So I looked into how to add my domain in my Mailgun account. My local Laravel app runs on the local domain myapp.app. Adding that to Mailgun is obviously not going to work as it only exists on my computer, plus even if I did it would ask me to add DNS records which I can't do on my local machine.
Another Laracasts user @Elimentz asks a similar question here:
https://laracasts.com/discuss/channels/laravel/sending-emails-with-mailgun
How are you supposed to send emails in a development setting using Mailgun?
I would very much appreciate some help on this, I know there is a simple answer but I'm just not seeing it!
Thanks everyone. David
Please or to participate in this conversation.