Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.post('/reqform', urlencodedParser, function (req, res) {
- response = {
- name: req.body.name,
- email: req.body.email,
- phone: req.body.phone
- };
- var mailContent = {
- from: 'myemail@gmail.com',
- to: 'myemail@gmail.com',
- subject: 'Service Request From req.body.name',
- text: response //*** Problem #1
- };
- transporter.sendMail(mailClient, function (error, info) {
- if (error) {
- console.log(error);
- } else {
- res.sendFile("success.html"); //** Problem #2
- }
- });
- })
Add Comment
Please, Sign In to add comment