squareboat / sneaker

An easy way to send emails whenever an exception occurs on server.
MIT License
222 stars 46 forks source link

Specifying email address in .env #50

Closed bilogic closed 4 years ago

bilogic commented 4 years ago

Hi,

I'm curious why not allow specifying the email address in .env file? If it is due to multiple email addresses, perhaps can consider the format below

L0_SNEAKER_EMAIL=a1@b.com
L1_SNEAKER_EMAIL=a2@b.com
Lx_SNEAKER_EMAIL=a3@b.com

Thanks!

akaamitgupta commented 4 years ago

@bilogic

You can do something in config/sneaker.php

'to' => explode(',', env('SNEAKER_EMAILS')),

and in .env

SNEAKER_EMAILS=a1@b.com,a2@b.com,a3@b.com
bilogic commented 4 years ago

@akaamitgupta what I meant was, SNEAKER_SILENT reads from .env by default, why doesn't SNEAKER_EMAIL do the same?

akaamitgupta commented 4 years ago

@bilogic config/sneaker.php is under your control you can update it as you require.

bilogic commented 4 years ago

@akaamitgupta i'm merely trying to provide a suggestion for improvement

akaamitgupta commented 4 years ago

Thanks @bilogic... really appreciate this. Will look into this in the next release.