Vipin Kumar KM
Vipin Kumar KM

Reputation: 366

How to set reply to in emailJS , the nodejs mailer?

I was trying to send a mail using the library emailjs in my node app.Everything is working except that I am not able to figure out how to set the 'reply to' property in the configuration.Here is my code

var email1   = require(node_path + "emailjs/email");

var server1  = email1.server.connect(mail_sever_conf);


//prepare the message
var msg1 = {
        from : '[email protected]',
        to:'[email protected]',
        subject: 'My App mail subject',
        text : 'Some mail content',
        replyTo : '[email protected]' //This is what I tried
        };          


        //send the email
        server1.send(msg1, function(err, message) { console.log(err || message); });

I dont see how to set that in their github page either, can someone please help me?

Upvotes: 3

Views: 4881

Answers (1)

Hiren S.
Hiren S.

Reputation: 2832

Try to use this:

reply-to

https://github.com/eleith/emailjs/blob/master/smtp/message.js Line : 93

They are just passing as Headers. So it should work.


This was resolved/commented on in an issue raised on the project: https://github.com/eleith/emailjs/issues/54

Upvotes: 2

Related Questions