So I have this basic contact form that asks for user's name,email and password and as a project I want to send through JavaScript or client-side an email confirmation like "account created" to the client's email input. I have searched numerous sites and stuff and thought it is pretty complicated so I made this question here. Thanks in advance for any answers!
Asked
Active
Viewed 86 times
0
-
You can't send an email directly from the client-side. You'll always need some service (either your own or a third party one). – Ivar Nov 16 '20 at 12:41
-
Does this answer your question? [How to send an email from JavaScript](https://stackoverflow.com/questions/7381150/how-to-send-an-email-from-javascript) – Ivar Nov 16 '20 at 12:42
-
As you are confirming 'account created' does this mean that you have a backend (e.g. something written in e.g. PHP on a server) which has checked the information and has saved it to some database? If so, that is the place to send the email from. You can't do it from the frontend. There are simple ways e.g. in PHP to send a confirmatory email like this. – A Haworth Nov 16 '20 at 17:31
1 Answers
1
You cannot.
You would need an email server that sends the email to your users. Setting up an mail server is quite complicated. People usually go with some mailing services like Sendgrid

bill.gates
- 14,145
- 3
- 19
- 47