[英]node.js send email successful, but mail not found
我正在為node.js應用程序使用https://github.com/eleith/emailjs正確設置配置后,當我發送電子郵件時,我在日志中收到成功消息,但是在中也看不到任何郵件收件箱或垃圾郵件箱:-( ..我使用gmail,smtp.gmail.com,ssl:true,端口:465。
email.send({...},function(err, message) {
if (err) {
console.log('Error sending email : ', err);
}
else {
console.log('Email SUCCESSFULLY sent', message);
}
^[[32m[2011-10-13 06:53:28.758] [INFO] console - ^[[39mEmail SUCCESSFULLY sent {
attachments: [],
html: null,
header:
{ 'message-id': '<1318488805460.5532@Abcd-PC>',
from: 'xxxxx@gmail.com',
to: 'yyyyy@gmail.com, ',
cc: 'zzzzz@gmail.com',
subject: 'Test mail from emailjs' },
content: 'text/plain; charset=utf-8',
text: 'Testing sending email' }
我在node.js中的電子郵件中使用以下代碼(使用emailjs )
var server = email.server.connect({
user: 'your@gmail.com',
password: 'gmailPass',
host: 'smtp.gmail.com',
ssl: true
});
server.send({
text: 'hello world',
from: 'obama@state.gov',
to: 'someone@else.com',
subject: 'just a subject here'
}, function(err, message) {
if (err) {
// err
} else {
// ok
}
});
問題是“收件人 ”電子郵件中的逗號( , ) “ yyyyy@gmail.com” 。 我試圖添加多個用逗號(,)分隔的ID,這造成了問題。
他們在文檔中提到了
**"someone <someone@gmail.com>, another <another@gmail.com>"**
may be it expects the email format to be in the form they mentioned.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.