Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 21 19:58
    vallemar commented #677
  • Apr 21 08:42
    Travis nodemailer/wildduck (v1.32.5) passed (1120)
  • Apr 20 17:51
    jiahengzhang66 commented #1071
  • Apr 20 12:08
    andris9 closed #1273
  • Apr 20 12:08
    andris9 commented #1273
  • Apr 20 12:05
    andris9 commented #1274
  • Apr 20 06:00
    ronieldegozo opened #1274
  • Apr 18 10:42
    Travis banyanink/nodemailer (master) still failing (25)
  • Apr 15 22:35
    bryanakitchen commented #920
  • Apr 15 18:46
    DoneDeal0 closed #1272
  • Apr 15 14:32
    DoneDeal0 edited #1272
  • Apr 15 10:49
    Isoaxe opened #1273
  • Apr 15 10:04
    DoneDeal0 edited #1272
  • Apr 15 10:04
    DoneDeal0 edited #1272
  • Apr 15 10:04
    DoneDeal0 edited #1272
  • Apr 15 10:04
    DoneDeal0 edited #1272
  • Apr 15 10:04
    DoneDeal0 edited #1272
  • Apr 15 10:04
    DoneDeal0 opened #1272
  • Apr 13 19:24
    Prefinem opened #1271
Mathieu Ghennassia
@mathieug
Mathieu Ghennassia
@mathieug
Second thing, I don't understand why attributes host+port doesn't work like attribute url. I'm trying to do url: 'smtp://{host}:{port}' but I get a TLS upgrade: https://runkit.com/mathieug/nodemailer--smtp-server/1.0.1
Surbhi Rawat
@RVTsurbhi
hello
i have used nodemailer for my app and every time my emails are going in spam...can anyone suggest the solution for this?
i'm using bluehost and while sending mails directly through my account its working fine but using node server mails are going in spam
Matteo
@Nibelino
do you guys model your data for the view into the mailer service or outside?
like for ex
when sending an email for a new order being created
Uzlopak
@Uzlopak
Hi, how can I check if the connection is still working?
Uzlopak
@Uzlopak
Anyone?
Amit-A
@Amit-A
@mathieug Did you end up getting that to work?
Eugen Cazacu
@oygen87
hi there, i am helping a friend to automate his workflow and gmail is unreliable. do you have any good free email provider we can try out? thanks
Amit-A
@Amit-A
@oygen87 What kind of automation?
For receiving/parsing there's testmail.app
AGosho
@axago
hi everybody, can we send and email without smtp ?
Michael Khoroshun
@Milkho
hi, can anyone help me to figure out what the problem is?
I have the following config:
"mailer": { "host": "email-smtp.eu-central-1.amazonaws.com", "port": 2587, "secure": true, "auth": { "user": "user", "pass": "pass" }
And code:
let transporter = nodemailer.createTransport(app.get('mailer')); app.use('/mailer', mailer(transporter));
It ends up with:
Error: connect ECONNREFUSED 127.0.0.1:587
But in the same time from terminal
telnet email-smtp.eu-central-1.amazonaws.com 2587
Results:
Trying 18.194.112.51... Connected to email-smtp.eu-central-1.amazonaws.com. Escape character is '^]'. 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-W0F3CN0 OMZCUaPbOVT1Ookc
What can be the problem here?
thomas200593
@thomas200593
Try to add rejectUnauthorized: false
Daniel Marcano
@DanielMarcano
Helloguys...
@DanielMarcano
Could anyone help me with nodemailer and sending emails through SMTP?
For now it only works if I use tls: { rejectUnauthorized: false }
But I take it this would allow MITM attacks for my site... and that's not the point, of course.
The thing is that I do not understand what is it that I need to add as a Certificate Authority, nor how.
And have not found any clear/straightforward information on this on the web...
Lean Junio
@leanjunio
Hey guys, has anyone gotten success with sending using sendmail?
Paulo Azevedo
@halufa
Hello guys. Is there a way to send a PLAIN TEXT email with Node Mailer?
ninobanks
@ninobanks
Hi, I need help to make my project work.
gacto
@gacto
hello guy! I an error during installing nodemailer using npm
@gacto I get an error*
Dennis Prochniak
@denysonique
Error: connect ECONNREFUSED 127.0.0.1:587
const transport = nodemailer.createTransport({direct: true})
trying to send to gmail...
is there an option to directly connect to rcpt smpt?
Dennis Prochniak
@denysonique
I want to replicate $ swaks --to myemail@gmail.com -- from myemail@gmail.com
nodemailer with direct transport should attempt contacting gmails smtp
not localhost
unsama
@unsama

hello guys, how to add a certificate?? i am using this its works on local but not live server

let transporter = nodemailer.createTransport({ host: "ro*****.com", port: 465, secure: true, auth: { user: "devel********p.com", pass: "4*******$" }, tls: { rejectUnauthorized: false } });

developerhub03
@developerhub03
Hi guys, I am trying to embed pdf in email body. Is there a way to do it?(Note: Not as an attachment)
Joey Merino
@Kuiil7
react - express- nodemailer w 0auth2 crash post req on deployment but fine in local
Damian
@damiantoczek
Hi guys, I've tried almost everything and I simply can't run nodemailer. I always get this error: TypeError: Cannot create property 'mailer' on string 'SMTP'
Andris Reinman
@andris9
@damiantoczek please follow Nodemailer documentation for setting up the transport object. From that error message it seems like you are using older Nodemailer configuration that was deprecated already in 2014. This configuration has not worked for the past 6 years. https://nodemailer.com/about/#example
safalt
@safalt
Hi guys, On localhost mailer service is working fine but when i deployed on server it's giving me error like
Hostname/IP does not match certificate's altnames: Host: smtp.gmail.com. is not in the cert's altnames
Andris Reinman
@andris9
you probably have a MITM somewhere, either your company firewall or a virus scanner. Gmail MTA most definitely has a valid cert.
Tommy
@tommymaher15

Hey guys. I'm looking to send a string as text as it stores a link to a csv file.

Unsure how to do this correctly

Can anyone recommend the best way to do this?
RajTh
@RajTh
Hi Team
I am facing issue for the below code:

import as fs from 'fs';
import
as _ from 'lodash';
import {browser} from "protractor";

let retry = require('retry'),
googleAuth = require('google-auth-library'),
google = require('googleapis'),
gmail = google.gmail('v1');

export class GmailHelper {
// Getting an auth object
static getAuth() {
let auth = new googleAuth(),
oauth2Client = new auth.OAuth2(
myCreds.client_id,
myCreds.client_secret,
myCreds.redirect_uris[0]
),
oauth2Client.credentials = {"client_id": "159ab9cfa0b5f30e",};
return oauth2Client;
}

// Converts the query passed as an object into a string
private static convertQuery(query: any): string {
    return _.map(query, (operator, item) => `${item}:${operator}`).join(' ');
}

// Retrieve a list of emails, matching the specified query,  from the authenticated inbox. The query is an object like: {from: ''}
async searchForEmails(query: any): Promise<Array<any>> {
    const res_1 = await this.googleCallWrapper((cb: any) => {
        gmail.users.messages.list({
            auth: GmailHelper.getAuth(),
            userId: 'me',
            q: GmailHelper.convertQuery(query)
        }, cb);
    }, (err: any, res: { messages: any; }) => {
        return err ? err : res.messages == undefined;
    });
    return res_1.messages;
}

// Retrieve the full data of a specific email from the authenticated inbox
async getEmailContent(id: any): Promise<any> {
    const res_1 = await this.googleCallWrapper((cb: any) => {
        gmail.users.messages.get({
            auth: GmailHelper.getAuth(),
            userId: 'me',
            id: id
        }, cb);
    }, (err: any, res: any) => {
        return err;
    });
    return res_1;
}

// Wraps all types of gmail calls into promise notation and retries the call x number of times with a scaling up timeout
// Also performs `browser.waitForAngular()` before the call in order to allow the operation on the page to finish before 
// checking for the email
/**
* @param googleCall {Function(googleCallback: Function) : Void} a function which performs a GoogleAPI call. When called, it is passed a GoogleAPI callback function which needs to be passed to the GoogleAPI
* @param shouldRetry {Function(error: string, response: Object) : boolean} a function which decides whether we should retry the GoogleAPI call. When called, it is passed the same arguments as the GoogleAPI callback function. It should return true if an error occurred or if the response is not satisfactory
**/
googleCallWrapper(googleCall: Function, shouldRetry: Function): Promise<any> {
    return new Promise(async (resolve, reject) => {
        let operation = retry.operation({
            retries: 4,
            minTimeout: 1000,
            maxTimeout: 3000,
            factor: 1.5,
        });
        try {
            await browser.waitForAngular();
            return operation.attempt(function (currentAttempt: any) {
                googleCall((err: any, res: any) => {
                    if (operation.retry(shouldRetry(err, res))) {
                        console.log('Retrying the email check');
                        return;
                    }
                    if (err) {
                        console.log('Email not found!');
                        reject(err);
                    } else {
                        console.log('Email found!');
                        resolve(res);
                    }
                });
            });
        } catch (err_1) {
            reject(err_1);
        }
    })
}

}

Issue part is:
static getAuth() {
    let auth = new googleAuth(),
        oauth2Client = new auth.OAuth2(
            myCreds.client_id,
            myCreds.client_secret,
            myCreds.redirect_uris[0]
        ),
    oauth2Client.credentials = {"client_id": "159ab9cfa0b5f30e",};
    return oauth2Client;
}
please help!
Daniel Mulvad
@danielmulvad
Howdy guys, I'm sure this has been asked before, but I can't seem to find the answer online. I cannot send emails when running nodemailer in a alpine-node docker container.
here is my config:
    const mail = nodemailer.createTransport({
      host: 'smtp.office365.com',
      port: 587,
      secure: false,
      auth: {
        user: process.env.SMTP_USERNAME,
        pass: process.env.SMTP_PASSWORD
      }
    })
this is my error:
mail error:  Connection timeout {"code":"ETIMEDOUT","command":"CONN","stack":"Error: Connection timeout\n    at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)\n    at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:760:20)\n    at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:229:22)\n    at listOnTimeout (node:internal/timers:556:17)\n    at processTimers (node:internal/timers:499:7)","timestamp":"2021-02-01 19:19:49"}
Daniel Mulvad
@danielmulvad
I've read the documentation that says: Check your firewall settings. Timeout usually occurs when you try to open a connection to a port that is firewalled either on the server or on your machine. but the ports are open in docker