Angular : Nodemailer Shows A Lot Of Runtime Error
In my angular project, I want to use Nodemailer to send mail. First problem is when I am trying to import ( i mean after doing npm i --save ) a lot of error occurs when i do ionic
Solution 1:
It will never work! As nodemailer
is a server-side nodejs
module, it's not meant for running inside your browser. The module require a bunch of connectivity objects to work properly which browser doesn't allow it to do so. So, at the end, you should have a backend which handle this kind of stuff.
Apart from the connectivity issues by the browser, you're at high security risk of loosing your email service
credentials! Because angular
is a client-side framework, your code is visible to the client that contains your email credentials! So anybody can decompile your code & steal which, I'm sure, you don't want.
So, try moving your email logic to the backend & be stable as well as safe!
Post a Comment for "Angular : Nodemailer Shows A Lot Of Runtime Error"