Pass variable to html template in nodemailer

What you can do is read the HTML file using fs module in node and then replace the elements that you want changed in the html string using handlebars var nodemailer = require(‘nodemailer’); var smtpTransport = require(‘nodemailer-smtp-transport’); var handlebars = require(‘handlebars’); var fs = require(‘fs’); var readHTMLFile = function(path, callback) { fs.readFile(path, {encoding: ‘utf-8’}, function … Read more

POST request not allowed – 405 Not Allowed – nginx, even with headers included

This configuration to your nginx.conf should help you. https://gist.github.com/baskaran-md/e46cc25ccfac83f153bb server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 404 /404.html; error_page 403 /403.html; # To allow POST on static pages error_page 405 =200 $uri; # … }