Guest User

Untitled

a guest
Oct 22nd, 2017
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. app.post('/reqform', urlencodedParser, function (req, res) {
  2. response = {
  3. name: req.body.name,
  4. email: req.body.email,
  5. phone: req.body.phone
  6. };
  7. var mailContent = {
  8. from: 'myemail@gmail.com',
  9. to: 'myemail@gmail.com',
  10. subject: 'Service Request From req.body.name',
  11. text: response //*** Problem #1
  12. };
  13. transporter.sendMail(mailClient, function (error, info) {
  14. if (error) {
  15. console.log(error);
  16. } else {
  17. res.sendFile("success.html"); //** Problem #2
  18. }
  19. });
  20. })
Add Comment
Please, Sign In to add comment