简体   繁体   English

在HTML电子邮件中指定主题行

[英]Specifying the subject line in an HTML email

I'm coding a quick HTML email using Foundation for Email s. 我正在使用Foundation for Email编写快速HTML电子邮件。 The tech stack isn't of huge importance, just highlights what I'm trying to accomplish in general. 技术堆栈并不是很重要,只是强调了我通常要完成的工作。

Something I'm wondering about is when someone receives my email (through any of a huge number of possible email clients) is it possible for me to specify in my HTML template what the "Subject" line should read? 我想知道的是,当有人(通过大量可能的电子邮件客户端中的任何一个)接收到我的电子邮件时,我可以在HTML模板中指定“主题”行应显示的内容吗?

In case I'm not being clear enough, I'm referring to the teaser text you see in your inbox before opening the actual email: 如果我不太清楚,我指的是打开实际电子邮件之前在收件箱中看到的预告文本:

Like in this instance from Gmail below: the "Your Amazon.com order of "Shovel Knight Amiibo"... text. 就像在下面的Gmail中一样:“您的Amazon.com订购“ Shovel Knight Amiibo” ...文本。

Is it possible to specify that text in my HTML template? 是否可以在我的HTML模板中指定该文本? Or is that handled by a service request? 还是由服务请求处理?

The mail subject is a header , eg: 邮件主题是标头 ,例如:

From: John Smith <john.smith@example.com>
Subject: Good news!

It isn't taken from the message body so the answer is no . 它不是从消息正文中提取的,因此答案是否定的

You need to specify it with whatever program/code you use to actually deliver the message and it has to be plain text. 您需要使用实际用于传递消息的任何程序/代码来指定它,并且该消息必须为纯文本。

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

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