Mar*_*ger 5 java email jakarta-mail
Javamail API有一个Massage类,它有一个getFrom()方法,你可以在这里找到:
https://javamail.java.net/nonav/docs/api/javax/mail/Message.html#getFrom()
关于这种方法的两个问题:
在标准RFC 5322 SMTP 中允许多个 FROM 地址
\n\n\n3.6.2. 发起者字段
\n消息的发起者字段由发件人字段、发送者字段(如果适用)和可选的回复字段组成。发件人字段由字段名称“发件人”和一个或多个邮箱规范的逗号分隔列表组成。如果发件人字段在邮箱列表中包含多个邮箱规范,则包含字段名称“发件人”和单个邮箱规范的发件人字段必须出现在消息中。在任何一种情况下,还可以包括一个可选的回复字段,其中包含字段名称“回复”和一个或多个地址的逗号分隔列表。
\nfrom = "发件人:" 邮箱列表 CRLF
\n
看看 Michael Hampton 对这个服务器故障问题的回答:SMTP 允许多个发件人地址。这有用吗?为什么存在?
\n正如他在回答中提到的:
\n\n\nRFC 822实际上给出了这种用法的示例。它要求\n使用时必须存在 Sender: 标头。
\n
\xc2\xa0
\n\n\nA.2.7。委员会成员的代理人
\nRun Code Online (Sandbox Code Playgroud)\nGeorge\'s secretary sends out a message which was authored\n jointly by all the members of a committee. Note that the name\n of the committee cannot be specified, since <group> names are\n not permitted in the From field.\n \n From: Jones@Host,\n Smith@Other-Host,\n Doe@Somewhere-Else\n Sender: Secy@SHost\n
| 归档时间: |
|
| 查看次数: |
509 次 |
| 最近记录: |