nodemailer

Nodemailer connection timeout error

我怕爱的太早我们不能终老 提交于 2020-01-13 06:58:53
问题 I am using nodemailer module to send mail from my nodejs application. I am getting Error: connect ETIMEDOUT xxx.xxx.xx.xxx:465 . Can any one help me in solving this. Here I am pasting my code. var transporter = nodemailer.createTransport({ service: 'Gmail', auth: { user: 'my_mail_id@gmail.com', pass: 'my_gmail_password' } }); console.log('created'); transporter.sendMail({ from: 'my_mail_id@gmail.com', to: 'my_mail_id@gmail.com', subject: 'hello world!', text: 'hello world!' }); 回答1: Have you

Loopback send Email with attachment from another module

断了今生、忘了曾经 提交于 2020-01-06 05:56:13
问题 I have form where i can able to save the file in some location and can store the values in the database.Now i have the email connector where i can fetch the values of the form and send it through email. I have two models one is for storing the values in the database i.e PersistedModel and the other is for storing the attachment now i want to send an email with attachment. how to send can anyone help me. career.js 'use strict'; const app = require('../../server/server'); module.exports =

Email not sending through 1and1 smtp host nodemailer caddy

北慕城南 提交于 2020-01-05 04:50:58
问题 In my nodejs express application, I send email using nodemailer when a new user registers and this is my email configuration, in my config.json: { "senderEmail": "email", "senderEmailPassword":"password", "smtpPort":587, "smtpHost":"smtp.1and1.com" } and the transporterOptions is as follows: var transporterOptions = { host: config.smtpHost, port: config.smtpPort, auth: { user: config.senderEmail, pass: config.senderEmailPassword }, secure:false }; Now in my local (development) environment, it

Nodemailer error while using gmail in firebase functions

北慕城南 提交于 2020-01-05 04:05:50
问题 I am using firebase cloud functions. I have the following setup configured. While that is working completely fine on my local machine, It's giving me an issue when run on the servers. I have tried gazillion work arounds on the internet but no luck. What is wrong with this? 'use strict' const functions = require('firebase-functions'); var admin = require('firebase-admin'); const express = require('express'); const nodemailer = require('nodemailer'); const app = express() var emailRecepient;

Getting error in Mail send Using Nodemailer

心已入冬 提交于 2020-01-04 04:58:16
问题 I create a project and follow all step written in answer of Nodemailer/Gmail - What exactly is a refresh token and how do I get one? but i am error. I use following code: var smtpTransport = nodemailer.createTransport("SMTP", { service: "Gmail", connectionTimeout : "7000", greetingTimeout : "7000", auth: { XOAuth2: { user: "", clientId: "", clientSecret: "", refreshToken: "" } } }); var mailOptions = { from: "", to:usersEmailId, subject: 'subject', html: 'string Of Html' } smtpTransport

unable to send html text using nodemailer

自古美人都是妖i 提交于 2020-01-04 04:47:08
问题 I am unable to send html text in mail using nodemailer. exports.send = function(req, res) { console.log(req.query); var mailOptions = { to: req.query.email, subject: req.query.sub, text: 'Date of Interview: ' + req.query.dateOfInterview+ 'Time of Interview: ' + req.query.timeOfInterview + '' + req.query.assignedTechnicalPerson + '' + req.query.typeOfInterview + '' + req.query.interviewLocation } smtpTransport.sendMail(mailOptions, function(error, response) { if (error) { console.log(error);

Send email to localhost smtp server in Node.js

我与影子孤独终老i 提交于 2020-01-03 11:58:27
问题 I'm using nodemailer to sends emails: var nodemailer = require('nodemailer'), config = require('./mailer.conf'); var smtpTransport; console.log('Creating Transport'); //smtp transport configuration var smtpTransport = nodemailer.createTransport({ host: config.host, port: config.port, auth: { user: config.email, pass: config.password } }); //Message var message = { from: "me@localhost.com", replyTo: "me@localhost.com", to: "me@localhost", subject: "hello" }; console.log('Sending Mail'); //

Sending HTML email with Node.js

巧了我就是萌 提交于 2020-01-03 05:27:11
问题 It is possible to send an html string via mail with nodemailer and that your mail client or webmail service renders it not as a string but as an html? 回答1: Here is some code I have used in the past... email.mustache <!DOCTYPE html> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> hello {{{key}}} </body> </html> email.js var async = require("async"), nodemailer = require("nodemailer"), url = require("url"), _ = require("underscore"

Nodemailer error when required

笑着哭i 提交于 2020-01-02 05:15:16
问题 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)

How to downgrade this node.js module to specific version and prevent automatic upgrade later?

霸气de小男生 提交于 2020-01-01 18:55:14
问题 I am using node.js Nodemailer module and encountered the following error; [Error: Unsupported configuration, downgrade Nodemailer to v0.7.1 or see the migration guide https://github.com/andris9/Nodemailer#migration-guide] I looked at my package.json and realize that it is "nodemailer": "^1.8.0", version. How do I downgrade to v0.7.1 and prevent automatic upgrade later when I run npm update ? 回答1: If you need exactly v0.7.1, use "nodemailer": "0.7.1" , delete nodemailer under node_modules and