Search code examples
angularemailclientprogressive-web-apps

How To send an Email from a client side angular form without server side application for Contact us form


I have an angular website (pwa website) without server side ( no database ) and I have a contact us form that I want to allow end user to send some data like "name","email","topic" and ... to a specific email like "info@gtx.com"

Currently I uploaded the website without contact us form on a Host domain.

I'm using angular 7 for the website


Solution

  • You can not send email directly through front end code. Instead you can

    • use end users mail client.
    • use a thrid party web service.
    • use your own back end service.

    (You can put the back end code in the same application and host it as one application. https://nodemailer.com/about/ is a lib for sending mail using back end js code)