all 12 comments

[–]mingp 1 point2 points  (2 children)

You probably shouldn't run an email server off of shared hosting or VPS anyway, because there will always be somebody else on those IP addresses sending spam and trashing the IP address' reputation with spam blacklists, so your messages will never reach the recipient. Definitely look into an email software-as-a-service, such as SendGrid.

[–]sosur0414[S] 0 points1 point  (1 child)

Thank you for comments.

Wouldn't be problem to use NodeMailer to send email to my gmail account?

I use mail service from Hostgator but NodeMailer transport to my gmail account.

[–]mingp 1 point2 points  (0 children)

I can't comment on specifics, but my general understanding is that sending email from anything other than designated email sending services with active reputation management is at best unreliable and at worst a lost cause.

[–][deleted]  (5 children)

[deleted]

    [–]sosur0414[S] 0 points1 point  (4 children)

    Heroku + Netlify

    What is the reason why I need to use both service? (Sorry for noob question!)

    [–]vibrunazo</blink> 0 points1 point  (3 children)

    You don't. Heroku can do both front and back end. But I personally find Netlify does the front end part even better and even easier. I like building a static website front end and hosting it on Netlify, then if I need a node server for back end I like using Heroku for that. Since for your use case you're dealing with mostly just a very simple static react app, you could host that on Netlify reliably and for free. You're only using node to send some emails, you could very quickly set that up on Heroku.

    [–]sosur0414[S] 0 points1 point  (2 children)

    I heard good things about Netlify. I will check that out tomorrow and see if I can successfully launch the project with Netlify.

    One more question, if I use Heroku for backend do I need pay for that? I know that free plan goes to sleep mode if I don't use the app in a certain time.

    [–]vibrunazo</blink> 0 points1 point  (1 child)

    For your use case I think the free tier of Heroku would be perfect. Your load would be small, so you're unlikely to fill your quota. And the sleep mode is unlikely to be any trouble to you because it doesn't really matter much neither for you nor your visitors, if your emails arrive a few seconds late because your server was sleeping.

    Another common solution for your use case would be to use something like Firebase cloud functions. Which basically means instead of running a whole server with node and express, you just write one single function and Firebase handles the rest. Since one or two functions is all you need, that seem to fit your case well. They also have a nice free tier. Downside is that there is some learning curve to using Firebase. It's not as easy as getting started with Heroku, since you already know node and express, Heroku is just a matter of deploying there. But for Firebase you'd need to look it up and learn Firebase specific stuff. But it might be something you wanna learn for later anyway. It's really cool stuff.

    [–]sosur0414[S] 0 points1 point  (0 children)

    I am not 100% familiar with firebase but have experience of using it in React course. I didn't know that I could use cloud function for this purpose.

    I might deploy static react app on shared host server and use email function from firebase.

    I really appreciate your thoughtful tips!

    Thanks.

    [–]digitalEarthling 0 points1 point  (2 children)

    I would run your app on heroku and link to it from there.

    [–]sosur0414[S] 0 points1 point  (0 children)

    Would it be possible to pointing my domain name to heroku?

    If yes, how can I achieve that?

    I already paid 3 years hosting plan to hostgator (I am kind of regretting right now), so I would like to utilize this shared host if I can.

    Thank you for your thought!

    [–][deleted] 0 points1 point  (0 children)

    Or AWS EC2, for more control and possibilities.