Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify specific email addresses for 'sendFailedJobEmail' #1

Open
terryupton opened this issue Jan 6, 2025 · 1 comment

Comments

@terryupton
Copy link

What are you trying to do?

Hey @engram-design
Great new plugin, I am looking to install it on my 2 client commerce sites initially.
However, I think it might be more flexible and viable to specify the email addresses for the sendFailedJobEmail rather than restrict this to an entire group.

To give some context on my use case:

  • I am an Admin and so I am not part of any user group, but I would like to get the notifications.
  • I also have a clients group that contains several staff members at the company who can access and make updates to the website, some of these are directors and not involved day to day. So I would rather be able to add the day to day managers of the site rather than the 'higher-ups' get notifications that might panic them. It would seem redundant to create additional groups just for this functionality.

I am using Commerce 4 on both sites.

What's your proposed solution?

A new config setting to replace 'failedJobUserGroup' with 'failedJobEmails' and be able to set an array of addresses in the config file like so:

'sendFailedJobEmail' => ['me@myemail.com', 'manager@sitesoter.com', 'manager2@sitestore.com']

Additional context

No response

@engram-design
Copy link
Member

I'll consider this, but the main reason for using a User Group was so that you can add emails to be notified of issues outside of developer involvement. If this change were to be made, only projects where allowAdminChanges = false were set (a local dev environment) would be able to add/remove emails.

Likely, I'll add an additional setting for extra arbitrary emails where you can manage this, in combination with a User Group.

But I will say, in your scenario, I would encourage the creation of a "Queue Monitor" user group, specifically for users who need to be notified. However, that doesn't help with Admin users, where you can't assign a user group, so the issue still stands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants