I've created a simple contact form which allows users to enter in their name, email and a text message on my website (running using firebase hosting
).
When they click submit
I want to generate an email and send it to myself from them (i.e. the from and/or reply-to would be the email address they entered) containing their message.
I know there are limitations around being able to do this from within the browser for a number of different reasons. I'm also aware that this could be achieved using a mailto
link with the extra information pre-populated in the email however I don't want to use this approach either.
Instead I was wondering if there's any way in which I can achieve this all from within the browser? I was think along the lines of making a POST
request to another service (not owned by myself) which would then send the email as described. Does anyone have any experience with this type of requirement?
NOTE: I'm currently hosting using firebase
as it's free for static content. I looked into whether I could run an express
server and make use of a something like nodemailer
, however I think I'll end up paying for somewhere to run it which seems a bit overkill given I don't expect to send more than 25-50 emails a month.