-
-
Notifications
You must be signed in to change notification settings - Fork 360
As a user / future participant I will receive a second email the day before the event to remind me. #276
Comments
@Zeko369 @timmyichen @vaibhavsingh97 @jacobbogers @eolculnamo2 we'll get some text for this one and #275 but @emred2700 asked about an email template language and I wondered what direction we'd go on the local email templates. We talked about using nodemailer over SMTP on #146 and #283, but I didn't see a specific template package and perhaps there's one already baked into Nodemailer. A quick search suggestions you can select a Nodemailer template package like email-templates. The choice of email template will define the markup of the text we generate and the location of the local template files. Is Node mailer definitely the package for sending? |
The issue of templates was already raised by me and we agreed to use plain text emails in the MVP |
To answer other question. Yes we're using |
Thanks I forgot about #290. So, just plain text in nodemailer, but if we need to insert dynamic pieces, like unique hashes to opt out of emails, then are those going to be hard coded text strings in the code, or would we still be using a template file with placeholders variables that will be merged in? It seems any of these 3rd party mail services should take a plain-text message as part of their SMTP, which I think is part of the SMTP spec, so perhaps the config templates are a post-MVP feature. @emred2700 if you have any old reminder emails from event services, like Meetup.com, Facebook, or whatever is popular where you are, then how about posting a screenshot of those to seed the conversation on text. I'll try to do the same. |
We can just use a template literal to create a email "function" instead of using HTML templates for now. const email = (user, link) => `
Hello ${user.name},
Go to ${link},
Bye
` |
Thanks. I was wondering if there as a plain-text template since folks usually don't like to mix content and logic. Though, for MVP what you posted looks expedient. |
The |
And since we're going to be sending 4 different emails in the MVP (or even less) it's ok to just use simple function as templates for now. |
Google Calendar reminders (below) are actually pretty close to plain-text and might be a better model for us than Meetup's rich reminders. Though, I only have organizer reminders in my trash so I'm not sure what the Meetup or Facebook reminders look like. |
I'm not the expert when it comes to managing SMTP servers, but I've some experience with several open-source mailing libraries. The problem I've majorly faced running my own SMPT server is: emails don't get delivered reliably, or even if they do, popular email applications (eg: Gmail) automatically move them into the SPAM folder. I've ended up just using 3rd party services like Twillio which takes care of those issues for me. |
@MihirSomani you misunderstod us, we're not talking about hosting our own SMTP server, rather using something like |
Yes, all of the popular services should work with SMTP to relay mail from the Chapter instance. Since SMTP is a protocol, this will avoid the owner of the instance having to configure the server to use a specific plugin for their transactional email service of choice. For example, SES would require a custom nodemailer plugin, in addition to nodemailer. For the MVP, we should be able to ask for an SMTP server hostname and user / password credentials (example). That would be saved in the instance's environment variables / configuration, like in a local |
Has there been any decision/discussion on how the scheduling will be handled? We could either have something like https://github.com/kelektiv/node-cron , or another service responsible only for querying the DB for "events happening tomorrow" and sending out the e-mails. |
Good question @davidals @Zeko369 and @timmyichen have been working on most of the node app, so I'm pinging them for input on who we might trigger reminder emails and other schedule tasks. |
@davidals great idea, I think that this should be part of the MVP. But there are some problems with this, so first we said that for simplicity we'll host this on Heroku and if we use I'd be really happy if you'd work on this with us, what do you think about this heroku-scheduled idea? Since someone somewhere will probably try to run it on their own server, they can easily just create a "regular" cron job that executes our script at midnight. (we can provide a simple snippet for them) Later we can defiantly add something like Bull, but that will require us to use redis, which is another dependency that I think we can live without for the MVP. |
Also this greatly exceeds the scope of this issue, so I'll be opening another one about this specifically, so we can move this conversation there |
@Zeko369 the Heroku approach sounds good to me with the caveat you mentioned about the script that Heroku is calling can also be called by a Linux crontab. |
Here's a rough first draft to get ideas moving on the text an options we might include in an event / rsvp reminder email.
|
Thinking through this process brought up the point that the locations don't have a street address or a URL in the schema. So, it's not clear with the current schema how someone would know where the event is located since #72 and #75 discussed, but did not include, address or geocoding. Also, @ceciliaconsta3 @madaleneaza-design are there any MVP accessibility items to address on emails like this notification? For MVP we're doing text only emails for simplicity. We are not immediately entertaining localization or internationalization for the MVP, but should we follow any standards with the date format or other parts of the email? |
I wanted to add the notes below since his email will likely include some options to allow members to unfollow or unsubscribe a type of notification or the entire chapter. The previous conversations about following / unfollowing a Chapter and unsubscribing from emails should provide good context on the type of links and privacy settings we imagined to make for easy opt-in and opt-out. That conversation also goes into interfaces on the website and name of buttons, type of buttons and such. The core of those email and UI opt-in / out conversations were on #107 and I tried to summarize the conversation at a few points, like: |
@ojeytonwilliams @allella , Could you please provide some information on how this should be implemented? All the discussion in this issue seems to be suggesting to use Heroku's scheduler. Could you please let me know your thoughts on that? Can we not create another docker container and run a scheduling job in it using a package like node-cron? |
I'm not sure of the best solution. One method that some CMS, like Wordpress, use is to add items to a queue and have the jobs scheduled at the end of normal web traffic. However, that's not the idea solution as it can slow down normal traffic. I suspect there would be some sort of queue involved and then a trigger for it, like the Heroku scheduler or cron job, but I'll defer to Oliver, @Zeko369 and others about the best approach. |
I'm not 100% sure either, but Fran makes a good argument for using Heroku's scheduler for the MVP (cost, simplicity and we're already considering Heroku in general). The main discussion is over here: #359 |
Emails will be sent only to members where the {event_users.subscribed} is true and their {rsvp status} is confirmed for the event. Post-MVP, we'll need to figure out what to do with people on the wait list. Email Title: Upcoming Event Reminder for {event.name}
|
I removed the MVP label because we're planning to integrate with Google Calendar. As a result this should end up being a fallback for users that don't use Google Calendar and so is not 100% necessary for a viable MVP. |
@ojeytonwilliams you added a task to "Finalize the text". Is that more of a technical thing, or does the suggested text / template above need more discussion? |
@allella no, that text looks good to me. It's just that we still have text like this in the reminder emails:
For this to be done, those placeholders would need to generate the correct links. |
I'll be working on this issue. |
Thanks @Johnny01232003, that would be great. If you have any questions, feel free to ask here or in our chat |
Actually, we are going to start off with something a little easier with the UI components #1143. Thank you @ojeytonwilliams for the resources and fast response though! |
You're very welcome! Thanks for helping out :) |
This is another thing that's currently covered by the Google calendar integration. Our own scheduling code does exist, but until we keep the number of emails under control, #1670, I'd rather keep that turned off. We should revisit this post MVP, though. |
Before we close this we need to:
The text was updated successfully, but these errors were encountered: