john john - 1 year ago 110
PHP Question

laravel 5.2 mail not working

I have laravel 5.2 with mamp pro in my mac. I work localhost, and i try to send email to mailtrap but is not work i have this error

Maximum function nesting level of '100' reached, aborting!

my .env


in my controller

Mail::send('emails.test', ['user' => 'test'], function ($m) {
$m->from('', 'Your Application');

$m->to('')->subject('Your Reminder!');

Answer Source

Try by adding the following code in bootstrap/autoload.php file. It increases the xdebug.max_nesting_level to 200.

ini_set('xdebug.max_nesting_level', 200);

If this doesn't solve then try to increase the level by 300 or 400.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download