Closed feerlessleadr closed 11 months ago
@feerlessleadr I'll see what I can do, glad you're enjoying the project!
@feerlessleadr are you self hosting NTFY? If so, what are you using for your SMTP server?
@pman07 yeah I'm self hosting ntfy still. For my SMTP, I'm just using my email service's server (although I've also used Gmail's SMTP with ntfy and that works well also).
@feerlessleadr Ok, I think what I have will work, I just don't have email notifications setup on my NTFY server.
I'm going to publish what I have for now, it doesn't cause any errors, but haven't been able to send an email yet.
If you're up for testing it feel free, otherwise I'm not sure when I'll get a chance to update my NTFY to use my gmail SMTP for full testing. Hopefully by the end of the week.
Sure thing, let me know when you push and what I need to set and I'm happy to test
It's pushed. Just add the following to your stack.env with your desired notification email address
EMAIL=nobody@example.com
Testing now - will report back shortly
@pman07 happy to report it worked perfectly. Thank you!
Is it possible to either change the subject/body of the email to something like "Immich - XX photos added to (Album Name) album!", as well as add the immich icon?
I'm afraid my parents are going to see that email now that I'm thinking about it and ignore it because they aren't going to remember the emails related to their grandkids' pictures.
@feerlessleadr cool! I don't believe it will accept the Immich icon, it only allows certain emojis. Would a customizable emoji in front of the subject such as "📷 Immich - XX photos added to (Album Name) album!" if you chose "emailTag = camera" work for you?
list of supported emojis/tags: https://docs.ntfy.sh/emojis/
That would be awesome, thanks!
@feerlessleadr just pushed those changes. Just add a tag to the stack.env like follows.
EMAILTAG=camera
Thanks - this works great. The only bug I noticed is that I'm now getting 2 ntfy notifications, in addition to the email (so 3 notifications in total). I'm getting the original ntfy notification with the immich icon, along with another ntfy notification that is identical to the email notification.
Ahhh, that makes sense.
I'm thinking a separate email topic would be cleanest, otherwise would have to have the same message and tags on both email and regular notification. Then as long as you don't subscribe to the email topic, you'll only get those via email.
Does this sound acceptable to you?
Yeah that works. I'm also ok with have an either/or option where it will send a ntfy notification OR email, depending on what the user selects in the env.
Then for those of us that want to send both, I can just spin up another instance of immich-notify with a separate stack.env.
I'm good with whatever you decide though honestly.
@feerlessleadr ok it should work now. it will use whatever the topic is defined for each album with "_email" appended to it.
Testing now - just waiting for the script to run again
@pman07 worked perfectly thank you!
@pman07 Hey - just wanted to let you know this is still working great.
One thing one of my users asked for - is there a way to add a link to either the album directly? My parents are older and keep forgetting how to use the app, but if they had a link in the email right to the album, that would be awesom. Not sure that's possible though. Thanks
It seems the title and body of the email have to be the same. I can add the link to the end of the message if you'd like?
Yeah, that works for me. Thanks!
Ok, I just added the link to the email message. Please let me know if it works!
Absolutely perfect, thank you!
Hey, I'm back but just wanted to let you know this has been rock solid for me. Thanks again.
I do have a bunch of users that I'd like to notify, but they are not technically inclined enough to install ntfy (or even know why that is).
I'd love to be able to add an option to also send an email in addition to the default ntfy message to a specific address, this way I can mass forward the email to those that would like to see new pictures.
I'm able to send emails in my own scripts following the directions in the attached: https://docs.ntfy.sh/publish/#e-mail-notifications
Thanks for your consideration!