Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.post('/contact', function (req, res) {
- let mailOpts, smtpTrans;
- smtpTrans = nodemailer.createTransport({
- servic: 'gmail',
- auth: {
- user: 'randomemail',
- pass: 'password'
- }
- });
- mailOpts = {
- from: req.body.name + ' <' + req.body.email + '>',
- to: 'jrodwod@gmail.com',
- subject: 'New message from contact form at your portfolio page',
- text: `${req.body.name} (${req.body.email}) says: n n ${req.body.message}`
- };
- smtpTrans.sendMail(mailOpts, function (error, response) {
- if (error) {
- res.render('contact-failure');
- }
- else {
- res.send(response);
- }
- });
- });```
- 2018-05-29T06:31:32.280501+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/contact" host=desolate-journey-40239.herokuapp.com request_id=4c462f91-9f47-4566-943a-2c5e24d795ac fwd="75.74.137.60" dyno=web.1 connect=0ms service=89ms status=503 bytes=0 protocol=https
Add Comment
Please, Sign In to add comment