发送的邮件有内容但是看不到
Sent email has content but it can't be seen
我正在尝试使用 new mail()
发送电子邮件,它几乎可以正常工作。
发送的电子邮件在原始邮件中包含所需的内容,但 Apple Mail(应用程序)无法读取它。
这是邮件(Apple App)问题还是邮件(ColdFusion 对象)问题?
最后但同样重要的是,ColdFusion 在 Windows 10
运行
ColdFusion 代码
var mail = new mail();
mail.setFrom(application.EMAILFROM);
mail.setTo(arguments.email);
mail.setSubject(application.GSSITE_FULL_NAME & " Password Reset");
mail.addPart( type="plain", charset="utf-8", body="This is a test message." );
mail.send();
通过电子邮件发送程序结果
原始电子邮件
Return-Path: <no-reply@xxx.com>
Received: from 10.211.55.15 (cpe-76-169-198-102.socal.res.rr.com [76.169.198.102]) by mail.xxx.com with SMTP;
Sat, 1 Jul 2017 19:41:27 -0700
Date: Sat, 1 Jul 2017 19:41:26 -0700 (PDT)
From: no-reply@xx.com
To: james@xxx.com
Message-ID: <65588416.79.1498963286429@mail.xxx.com>
Subject: xxx Password Reset
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_78_1984282986.1498963286427"
X-Mailer: ColdFusion 2016 Application Server
X-SmarterMail-TotalSpamWeight: 0 (Authenticated)
------=_Part_78_1984282986.1498963286427
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
This is a test message.
------=_Part_78_1984282986.1498963286427
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
------=_Part_78_1984282986.1498963286427--
帮助
这是怎么回事?
这是一个影响所有 iOS 设备的已知问题。为避免这种情况,请在您的邮件正文中添加一个 HTML 部分:
mail.addPart( type="plain", charset="utf-8", body="This is a test message." );
mail.addPart( type="html", charset="utf-8", body="<p>This is a test message.</p>" );
确保在邮件部分之前添加普通部分,因为这是问题的一部分。
为什么?谁知道?这可能是严格遵循 RFC 的 SHALL/SHOULD/MAY 和 Apple 方面的不当实施的结合。
我正在尝试使用 new mail()
发送电子邮件,它几乎可以正常工作。
发送的电子邮件在原始邮件中包含所需的内容,但 Apple Mail(应用程序)无法读取它。
这是邮件(Apple App)问题还是邮件(ColdFusion 对象)问题?
最后但同样重要的是,ColdFusion 在 Windows 10
运行ColdFusion 代码
var mail = new mail();
mail.setFrom(application.EMAILFROM);
mail.setTo(arguments.email);
mail.setSubject(application.GSSITE_FULL_NAME & " Password Reset");
mail.addPart( type="plain", charset="utf-8", body="This is a test message." );
mail.send();
通过电子邮件发送程序结果
Return-Path: <no-reply@xxx.com>
Received: from 10.211.55.15 (cpe-76-169-198-102.socal.res.rr.com [76.169.198.102]) by mail.xxx.com with SMTP;
Sat, 1 Jul 2017 19:41:27 -0700
Date: Sat, 1 Jul 2017 19:41:26 -0700 (PDT)
From: no-reply@xx.com
To: james@xxx.com
Message-ID: <65588416.79.1498963286429@mail.xxx.com>
Subject: xxx Password Reset
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_78_1984282986.1498963286427"
X-Mailer: ColdFusion 2016 Application Server
X-SmarterMail-TotalSpamWeight: 0 (Authenticated)
------=_Part_78_1984282986.1498963286427
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
This is a test message.
------=_Part_78_1984282986.1498963286427
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
------=_Part_78_1984282986.1498963286427--
帮助
这是怎么回事?
这是一个影响所有 iOS 设备的已知问题。为避免这种情况,请在您的邮件正文中添加一个 HTML 部分:
mail.addPart( type="plain", charset="utf-8", body="This is a test message." );
mail.addPart( type="html", charset="utf-8", body="<p>This is a test message.</p>" );
确保在邮件部分之前添加普通部分,因为这是问题的一部分。
为什么?谁知道?这可能是严格遵循 RFC 的 SHALL/SHOULD/MAY 和 Apple 方面的不当实施的结合。