自定义邮件标题

编程入门 行业动态 更新时间:2024-10-12 03:27:59
本文介绍了自定义邮件标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在我的电子邮件中添加一个查询ID号码,以便用户回复时可以自动将电子邮件附加到查询中。

i want to add a enquiry id number to my emails so that when a user replies i i can automatically attach the email to an enquiry.

我要放一个消息,请不要在回复时删除此查询号码,但如果我可以放置一个带有查询号码的自定义标题,那么用户不会看到它。

I am going to put a message with please do not remove this enquiry number when replying but it would be good if i can put a custom header with the enquiry number so the user doesnt see it.

这是可能的,是否有垃圾邮件添加了自定义标题?

Is this possible and is there any spam isssues addingh a custom header ?

最好的问候 rick

best regards rick

推荐答案

容易做到,只需使用 ActionMailer 子类

Easy to do, just use the headers method from your ActionMailer subclass

根据电子邮件规范,使用X -

Per the email spec, start your non-standard headers with an X-

例如,X-inquiry-num,不是查询号码

Eg X-enquiry-num, not enquiry-num

另外,不要指望在邮件传输/传递中的某个时刻,标题不被剥离/回复过程。他们通常通过,但不总是。

Also, don't count on the header not being stripped at some point in the mail transport/delivery/reply process. They usually get through, but not always.

另一种方法:将您的查询号码添加到您的From和Reply-To地址。使用+号,所以地址的主要部分将有效。例如回覆:cust_svc+123@mycompany

Another way to do it: add you enquiry number to your From and Reply-To addresses. Use the + sign so the main part of the address will be valid. Eg Reply-To: cust_svc+123@mycompany

- foo@woof的有效电子邮件地址可以添加+邮件仍然是交付给同一个邮箱。例如,foo@woof使用相同的邮箱,foo+123@woof,foo+123_456@woof

-- A valid email address of foo@woof can have a + added and the mail will still be delivered to the same mailbox. Eg the same mailbox is used for foo@woof, foo+123@woof, foo+123_456@woof

您的sw可以自动读取和处理传入的邮件可以查看完整的地址并妥善处理。

Your sw that automatically reads and handles the incoming mail can view the complete To address and handle appropriately.

此技术经常用于自动处理发送到邮件列表的退回邮件 - 电子邮件单独发送到列表中的所有人都使用person_id作为回复地址和地址的一部分。这样,邮件列表sw可以自动找出哪些地址已退回。

This technique is often used for automatically handling bounce messages send to a mailing list--emails are sent individually to everyone on the list with the person_id included as part of the reply-to and from addresses. That way the mailing list sw can automatically figure out which addresses bounced.

更多推荐

自定义邮件标题

本文发布于:2023-10-30 07:23:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542166.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   邮件   标题

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!