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

Not possible to use multiple recipients #3

Closed
rbuffi opened this issue Jan 23, 2023 · 5 comments
Closed

Not possible to use multiple recipients #3

rbuffi opened this issue Jan 23, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@rbuffi
Copy link

rbuffi commented Jan 23, 2023

Hello, I'm trying to sent my grafana reports to multiple recpients by using comma separated mail addresses as value for the SMTP_TO environment variabele but this is not working. Can you help me out defining multiple recipients? Thanks in advance.

@tlex tlex added the question Further information is requested label Jan 23, 2023
@tlex
Copy link
Member

tlex commented Jan 23, 2023

This functionality is currently not implemented. The python smtplib library supports it, but it's currently called with a string, not a list.

I could imagine adding a function to parse the string from the environment variable on #L32, however this will take a bit of time (probably until the weekend).

In the meanwhile, as a workaround, you can call the script multiple times, for every destination address you have.

@tlex tlex self-assigned this Jan 23, 2023
@rbuffi
Copy link
Author

rbuffi commented Jan 24, 2023

That would be great. I got a large list of recipients so for now I will sent the reports to myself and redistribute. Let me know when the function is implemented so I can test it for you. Thanks again!

@tlex
Copy link
Member

tlex commented Feb 2, 2023

I have made the changes, but haven't merged them yet to master.

A new image already has been built, if you want to try it out: registry.gitlab.com/ix.ai/grafana-email:dev-branch. I have tested it successfully with two recipients.

Personally, I still recommend as the more elegant solution to use a mailing list as recipient - this way there's no need to change the systemd timer / cron job every time someone wants to be added / removed.

Edit: forgot to mention - just use a space separated list for SMTP_TO (such as email1@domain email2@domain2 email12@domain14)

@tlex tlex added enhancement New feature or request and removed question Further information is requested labels Feb 2, 2023
ix-ai-bot pushed a commit that referenced this issue Mar 1, 2023
#3: Add support for space separated recipient list

See merge request ix.ai/grafana-email!17
@tlex
Copy link
Member

tlex commented Mar 1, 2023

The changes have been merged. I'll release a new version with support for the space-separated list.

@tlex
Copy link
Member

tlex commented Oct 17, 2023

Well, this was released 8 months ago in version v0.6.0. Closing the issue.

@tlex tlex closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants