Info on an app sending out an email

Okay so, I’m currently making an app with the goal of one of the features being an email because sent from the user’s email account at a scheduled time. This is a /little bit/ over my head, but I’m working on learning what I need to do it. I’m writing this to ask for suggestions on what I MUST learn in order to do this. I’m not looking for anyone to tell me explicitly how to do it. That takes the fun out of programming. But I’m fairly new to back end and so I’m not entirely sure what is necessary to make it happen. Like, Node.js, Express, MongoDB, etc., is it possible with these? Or am I way off? Thanks!

There are many ways you can do this but if you are following mostly the freeCodeCamp curriculum then Node.js (and most likely Express, too) may be the better solution for you. If you want to store user information then, yes, MongoDB (or any DBMS that you are familiar with) can be used for that, too.

If you are going to be using Node.js, you may want to take a look at the Nodemailer, you can also play with it on Glitch.

One other important thing to keep in mind is security—while what you described can definitely be done, at first glance the functionality requires knowledge of a user’s password for her e-mail account (unless the e-mail provider has an API for doing that securely without a password); I personally feel rather uncomfortable about storing third party passwords in an app I write.

I hope that helps!

Thank you! I’m not actually following the FCC curriculum right now. I did for front end, but I’m not really thrilled with it for the back end stuff. It’s really wonky and frustrating.

Also thanks for pointing out the issue about security! I’m wondering, if the app is on phones where email accounts are perpetually logged in, does the password need to be stored? Or does there just need to be an initial authentication process? I could also tweak it so that it has a prompt for a reminder rather than doing the actual email, but I don’t /want/ to do that if I could avoid it. :stuck_out_tongue:

The backend section in the beta curriculum is reasonably not-wonky (in my opinion). If it’s the current curriculum that you found wonky and haven’t tried the beta one yet, it may be worthwhile having a quick look to see if you like it (if you are not already working through some other material).

As for how an app would function on a phone I really don’t have a clue. I am guessing that passwords are actually not stored (only used for the initial authentication) and sessions are managed by cookies or some sort of token mechanism.

If I may ask—must the e-mail be sent from the user’s personal e-mail address because it’s a feature (absolutely no offence—I’m curious because I personally can’t think of a good and/or kosher use case for such a feature)? If not, I think there are probably other solutions, such as text bots and/or notifications through the app, that you can look into.

No offense taken! Every app that hopes to be even barely well written needs to be analyzed and criticized and I’m prepared for that. :stuck_out_tongue: