When a user signs up with an email and enters a domain that is invalid, an error is thrown by Mailgun when the verification emails are to be sent, see below
Client error:
POST https://api.mailgun.net/v3/...removed.../messages.mimeresulted in a400 BAD REQUESTresponse: { "message": "'to' parameter is not a valid address. please check documentation" }
This stops the app dead in its tracks.
Since that previous issue thread, Laravel added new email validation options: https://laravel.com/docs/7.x/validation#rule-email
Applications can update RegisterController@validator() to:
'email' => ['required', 'string', 'email:rfc,dns', 'max:255', 'unique:users'],
Invalid domains will cause the form submission to fail before saving to the database and making a Mailgun request.
Since that previous issue thread, Laravel added new email validation options: https://laravel.com/docs/7.x/validation#rule-email
Applications can update
RegisterController@validator()to:'email' => ['required', 'string', 'email:rfc,dns', 'max:255', 'unique:users'],Invalid domains will cause the form submission to fail before saving to the database and making a Mailgun request.
Thanks! Have been holding off on upgrading but glad to know that there are additional validation rules to cover that case.
Since that previous issue thread, Laravel added new email validation options: https://laravel.com/docs/7.x/validation#rule-email
Applications can update
RegisterController@validator()to:'email' => ['required', 'string', 'email:rfc,dns', 'max:255', 'unique:users'],Invalid domains will cause the form submission to fail before saving to the database and making a Mailgun request.
You are awesome, your comment fixed my problem, thanks :)
Most helpful comment
Since that previous issue thread, Laravel added new email validation options: https://laravel.com/docs/7.x/validation#rule-email
Applications can update
RegisterController@validator()to:Invalid domains will cause the form submission to fail before saving to the database and making a Mailgun request.