nodemailer

send email via nodemailer

こ雲淡風輕ζ 提交于 2019-12-06 12:58:45
问题 I try to send email via nodemailer but getting error - TypeError: Cannot read property 'method' of undefined . It looks like sendMail function is not defined. Any advise please? P.S. This code for chatbot hosted on AWS var nodemailer = require('nodemailer'); var smtpTransport = require('nodemailer-smtp-transport'); module.exports = function someName() { // create reusable transporter object using the default SMTP transport var transporter = nodemailer.createTransport(smtpTransport({ service:

sending mail with nodemailer - email from field incorrect

一笑奈何 提交于 2019-12-06 06:04:56
问题 Trying to set up a contact form with nodemailer. Here's what's in my app.js: // EMail configuration var smtpTransport = nodemailer.createTransport("SMTP",{ service: "Gmail", auth: { user: "myemailaddress", pass: "xxx" } }); // CONTACT FORM app.get('/contact', function (req, res) { res.render("contact"); }); app.post('/contact', function (req, res) { var mailOptions = { from: req.body.email, // sender address to: "myemailaddress", // list of receivers subject: req.body.subject, // Subject line

Nodemailer - Works locally but not on production

风格不统一 提交于 2019-12-06 05:15:02
问题 https://gist.github.com/anonymous/ba82f74071cc38a0700b Before changing some settings, e.g. host and port, it was working fine locally, but just won't work on production. Anyone know why? Thanks 回答1: Disable Captcha temporarily so you can mail using new server, https://accounts.google.com/b/0/displayunlockcaptcha 回答2: i think this is happening because of port number and your firewall at this port is not allowing you to send mail over this port(80) . try with 587 or 465 which are actually the

Sending mail in node.js using nodemailer

旧城冷巷雨未停 提交于 2019-12-06 02:55:58
问题 I am trying to send mail in node.js using Nodemailer but it shows some error like { [Error: self signed certificate in certificate chain] code: 'ECONNECTION', command: 'CONN' } My node.js code is var express = require('express'); var app = express(); var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport('smtps://something%40gmail.com:password@smtp.gmail.com'); var mailOptions = { to: 'stevecameron2016@gmail.com', subject: 'Hello ?', text: 'Hello world ??', html:

Nodemailer - MS Exchaneg server - Error unable to verify the first certificate

房东的猫 提交于 2019-12-06 02:50:24
I am trying to send email from NodeJS using out office MS Exchange Mail server. with below code. And get error Our Admin said no certificates are needed. Error:- $ node test2.js Error : { Error: unable to verify the first certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1048:34) at TLSSocket.emit (events.js:182:13) at TLSSocket._finishInit (_tls_wrap.js:628:8) code: 'ESOCKET', command: 'CONN' } NodeJS Code:- "use strict"; const nodemailer = require("nodemailer"); async function main() { try { // create reusable transporter object using the default SMTP transport let transporter =

Bulk email sending usiing node.js

这一生的挚爱 提交于 2019-12-05 21:59:32
I am trying to make a small dashboard where i can send bulk email using my own SMTP servers. I want to use node for this, can anyone guide from where to start i want to send mails from different SMTP servers. A most common way to send email in Node is using Nodemailer . It has an excellent documentation. You can use it to send email using any SMTP servers and there are a lot of preconfigured ways to send using Gmail or other specialized transports. The available transports are - from the README: nodemailer-mailgun-transport for sending messages through Mailgun's Web API nodemailer-mandrill

Embed image in email body nodemailer nodejs

倾然丶 夕夏残阳落幕 提交于 2019-12-05 18:43:44
问题 I am following the approach used in the nodemailer community site but I cannot seem to get it to work as I am getting the error Failed to send email { Error: ENOENT: no such file or directory, open './rello-logo-full-svg.svg' errno: -2, code: 'ESTREAM', syscall: 'open', path: './rello-logo-full-svg.svg', command: 'API' } The nodemailer options are as follows let mailOptions = { from: '<from_email>', to: to_email_address.toString(), subject: 'Subject', text: 'Hello world', // plain text body

Nodemailer error when required

╄→尐↘猪︶ㄣ 提交于 2019-12-05 15:17:47
My resume website is almost done, I'm just finalizing a "Contact me" form that should send me an e-mail with some plain text. Here's what it looks like in Jade: div.contact-email-box form(id='contact-form' action='/' method='post') h3 Contact me div label span Name: input(placeholder='e.g: Mark' type='text' tabindex='1' required autofocus) div label span Email: input(placeholder='e.g: mark@example.com' type='email' tabindex='2' required) div label span Message: textarea(tabindex='3' required) div button(name='Submit' type='submit' id='contact-submit') Send Email And here's where I catch the

Email opened/not tracking from nodejs nodemailer

人盡茶涼 提交于 2019-12-05 10:46:36
What I know I want to implement the email opened/not tracking in one of my websites. after searching i found that email-opened/not tracking is done by sending an embedded image along with email(typically 1 px transparent). when some one opens the email and if they allow images then we get a req for the image and we track that. what i am using to achieve what i know I am using MEAN stack for the project and nodemailer for sending emails with amazon ses as sending service. Problem I am able to send the embedded images using above technologies but the problem is in node mailer, you have to attach

ETIMEDOUT connect error using nodemailer in Nodejs Openshift application

我怕爱的太早我们不能终老 提交于 2019-12-05 10:21:48
I'm facing some problems using the nodemailer module in my node.js single gear non-scalable application in Openshift. As the documentation suggested, I initialized the transporter object and used the sendMail function. A simplified version of my code is var transporter = nodemailer.createTransport({ service: 'Gmail', auth: { user: 'my.mail@gmail.com', pass: 'mypassword' } }); var mail = { from: 'my.mail@gmail.com', to: 'test@mydomain.com', subject: 'Test mail', html: 'Test mail' }; transporter.sendMail(mail, function(error, info) { if(error){ console.log(error); }else{ console.log(info); } });