I have a problem with sending mails using nodejs and my gmail account to google groups. I am not really sure on which end is the problem, because it was working a week ago, but now those mails just didn't arrive to google groups.
I also added my private mail like this:
smtpTransport.sendMail({
from: config.from,
to: private_mail + ',' + group_mail,
subject: subject,
html: messagebody
}, function () ...
And to my private email all the mails arrived, but nothing to google groups.
I tried configs below, but neither worked:
var smtpTransport = nodemailer.createTransport({
service: 'gmail',
auth: {
user: config.auth.user,
pass: config.auth.pass
},
debug: true
});
var smtpTransport = nodemailer.createTransport({
port: 587,
host: 'smtp.gmail.com',
requireTLS: true,
auth: {
user: config.auth.user,
pass: config.auth.pass
},
debug: true
});
There is no debug info in the console of possible failure.
Thanks in advance for any help!
When I tried to switch to emailjs library as @dege recommended, I noticed that the 'from' filed was not setted correctly. For some reason google groups is blocking messages without that field, but other mail clients will not complain. That is why I received the mails to my private mailbox, but not through the groups.
Nodemailer was not complaining and google groups was also silent about the problem. But at the end, it was my mistake. When I fixed everything started to work as usual.