anlutro / laravel-4-smart-errors

Smarter error handling for Laravel 4
65 stars 13 forks source link

Modified mailer configuration #32

Closed realtarget closed 7 years ago

realtarget commented 8 years ago

Hi, is it possible to include a modified mailer configuration e.g. Config::set('services.mandrill.secret', '123456'); in the config.php? Regards, Rene

anlutro commented 8 years ago

The package just uses the global mailer service, so as long as you've configured that correctly with your mandrill secret or whatever, you shouldn't need to specify anything like that in the package config.

realtarget commented 8 years ago

Thanks for the quick reply. The problem is, that we get lots of errors and need to split the error mails in our mandrill statistics by using another smtp login just for your plugin.

anlutro commented 8 years ago

I see... I think the easiest way would be to subclass AlertLogMailer, call Config::set there, then use App::bind to replace the package's version of the mailer class with your subclass one.

Though if you're getting to a point where this is a problem for you, may I recommend stop using my package and use something more sophisticated like Sentry instead? :)