I have a very simple code that uses MailGun in my Symfony2 application:
public function sendNewEmail()
{
$message = \Swift_Message::newInstance()
->setSubject('Any random subject')
->setFrom('welcome@mycompany.com')
->setTo('myemail@email.com')
->setBody('Mybody');
$this->mailer->send($message);
return null;
}
This code use to work very fine, but after some days ago it simply doesn't work anymore. It returns the error in the end.
I have no idea of what this problem can be once I haven't changed almost anything in code.
How could I discover what is?
request.CRITICAL: Uncaught PHP Exception Mailgun\Connection\Exceptions\MissingRequiredParameters: "The parameters passed to the API were invalid. Check your inputs! Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in domain settings." at /srv/www/MyCodeSource/vendor/mailgun/mailgun-php/src/Mailgun/Connection/RestClient.php line 169 {"exception":"[object] (Mailgun\Connection\Exceptions\MissingRequiredParameters(code: 0): The parameters passed to the API were invalid. Check your inputs! Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in domain settings. at /srv/www/MyCodeSource/vendor/mailgun/mailgun-php/src/Mailgun/Connection/RestClient.php:169)"} []