ruby-on-rails – 如何显示最初发往电子邮件的电子邮件?
发布时间:2020-12-17 02:04:05 所属栏目:百科 来源:网络整理
导读:我有一个系统接收和发送邮件给组中的各个成员. 假设我有一个有成员的组support@xyz.com member_1@xyz.com member_2@xyz.com 等等.. 同样的方式还有另一个有成员的团队help@xyz.com member_1@xyz.com member_3@xyz.com 等等.. 当我收到support@xyz.com的任何
我有一个系统接收和发送邮件给组中的各个成员.
假设我有一个有成员的组support@xyz.com > member_1@xyz.com 等等.. 同样的方式还有另一个有成员的团队help@xyz.com > member_1@xyz.com 等等.. 当我收到support@xyz.com的任何邮件时,它会转发给它的会员,并以同样的方式发送到help@xyz.com. mail :from => the_person_who_sent_mail,:to => members_email_id,:subject => mail_subject,:reply_to => the_group_name@xyz.com 似乎邮件发送给我了. 但我想对此进行更改,如下所示: 当它落入我的收件箱时应该是这样的 From : the_person_who_sent_mail@something.com Reply To : the_group_name@xyz.com To : the_group_name@xyz.com 但根据我的设定它就像 From : the_person_who_sent_mail@something.com Reply To : the_group_name@xyz.com To : members_email_id@xyz.com 在我的情况下,它显示邮件发往我.但在第一种情况下,它显示邮件最初的目的地. 解决方法
邮件列表服务器使用BCC完成此操作,如下所示:
mail :from => the_person_who_sent_mail,:to => the_group_name@xyz.com,:reply_to => the_group_name@xyz.com,:bcc => [members_email_id] 这样做的缺点是您的邮件服务器实际上会尝试将电子邮件发送到the_group_name@xyz.com,因此必须知道忽略此邮件.但是,当邮件到达用户的收件箱时,收件人:将是the_group_name@xyz.com. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |