繁体   English   中英

使用nodemailer将带有node.js的电子邮件发送到Microsoft Exchange时出现问题(标题显示在电子邮件正文中)

[英]Problem sending emails with node.js using nodemailer to Microsoft Exchange (headers show up in email body)

发送多个收件人的电子邮件时遇到棘手的问题。 它在公司的Intranet上,某些收件人在2010 Exchange服务器上,而某些收件人在2007 Exchange服务器上。 基本上,标题出现在电子邮件的正文中,但棘手的部分是有时它似乎只发生在2007 Exchange服务器上的标题中。

这是脚本的示例输出。

Command 'DATA' sent, response:
354 Start mail input; end with <CRLF>.<CRLF>
X-Mailer: Nodemailer (0.1.5; +http://www.nodemailer.org)
From: thesender@someemailer.com
To: a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com, a_bunch_of_emails@someemailer.com
Subject: Test email, Test email, Test email, Test email, Test email, Test email, Test email, Test email, Test email
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=----NODEMAILER-1-1298645067811

--------------(Headers End and Body Begins)-----------------

 ------NODEMAILER-1-1298645067811
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Plain Text Body

------NODEMAILER-1-1298645067811
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Html Body

------NODEMAILER-1-1298645067811--
221 2.0.0 <SERVER IM CONNECTING TO> Service closing transmission channel

这封邮件发送得很好,但是,如果我增加收件人的数量,电子邮件将失败,并且电子邮件内容中的“发件人” From: thesender@someemailer.com下方将显示所有内容。

我试过仅发送文本/纯文本或仅发送文本/ html,但无论如何似乎都失败了,唯一一致的失败似乎是收件人的长度。 关于下一步尝试,我有些茫然。

我正在使用此模块发送电子邮件: https : //github.com/andris9/Nodemailer

好的,似乎直接由“收件人:”字段的长度引起。 当我直接发送多个(〜200个)电子邮件收件人时,会引起问题。 我不确定这是否仅是Microsoft的事情,但是当我将“ To:”字符串分成3封电子邮件,后跟换行符时,效果很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM