Message from JavaScript discussions

September 2018

— And how can I hide the password of my mail? I have my whole site in GitHub


* Make a form that POSTs urlencoded data
* Use express.urlencoded to decode that data
* Use nodemailer to send that data

— Use environment variables

— Nice, ty

— Windows:

npm run start

and in code:

user: process.env.EMAIL_USER,
password: process.env.EMAIL_PASSWORD

Message permanent page

— Something like that anyway

— To do the same on Linux / Mac, you just remove set

— What do you mean with urlencoded data? Coult it work like this?
<form action="" method="post" class="">
<input class="form-control" id="name" name="name" type="text" placeholder="Name *" required="required">
<textarea class="form-control" id="message" name="message" type="text" placeholder="Message *" required="required"></textarea>

Message permanent page

— Yep, looks good

— Https://

— Here are some examples of urlencoded vs form-data

— The default is urlencoded