如果收到的电子邮件属于垃圾邮件,则向用户显示一条消息
这是一个棘手的问题,可能有一个在 gmail(或任何其他提供商)中使用 HTML 的解决方案,
假设您从服务器发送了一封电子邮件,该电子邮件是 HTML 格式的,用户在阅读电子邮件时将电子邮件接收到他的垃圾邮件文件夹,邮件的一部分告诉他“此邮件已被显示为垃圾邮件”或“将此邮件标记为非垃圾邮件”,但如果他将邮件接收到收件箱,则不会显示此文本。
一直试图使用图像替代文本来做到这一点,有点失败:(。
kinda a tough question that might have a solution using HTML in gmail (or any other provier)
assuming you have sent an email from your server , the email is HTML formatted , user receives the email to his SPAM folder , when he reads the email , a portion of the message tells him that "This message has been displayed as spam" or "mark this message as not spam" , but if he receives the message to the inbox , this text is not displayed .
been trying to do it using image alt text , kinda failed :( .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
根本不可能。对不起。
Simply not possible. I'm sorry.
您的意思是,您想从您的电子邮件中检测到这一点?
那是不可能的。唯一接近的确实是图像未加载时会显示的
alt
文本 - 但这是可疑的,因为它可能不会被所有客户端显示。除此之外是不可能的,因为您无法知道用户正在从哪里查看您的电子邮件,而且您无论如何也不可能进行交互。You mean, you want to detect this from within your E-Mail?
That is impossible. The only thing coming close is indeed the
alt
text that would display if the image doesn't get loaded - but that is dubious because it probably isn't displayed by all clients. More than that is not possible, because there is no way for you to tell where the user is viewing your E-Mail from, and you have no possibility of interacting anyway.在每封电子邮件的底部添加“请添加 [电子邮件受保护] 至如果此邮件已被标记为垃圾邮件,则您的地址簿”或使用 1x1px 透明图像,并带有相同的 ALT 文本。从可用性的角度来看,要求每个用户将您的地址列入白名单并不是什么问题,那些没有将其标记为垃圾邮件的人会忽略。
Either include at the bottom of each email "Please add [email protected] to your address book if this message has been marked as spam" or to use a 1x1px transparent image with ALT text reading the same. From a usability point of view, it's not really a problem to ask every user to whitelist your address, those who didn't have it marked as spam will ignore.
在电子邮件离开作者的控制后,作者无法在电子邮件被检测为垃圾邮件(或其他邮件)的情况下对其进行修改。
There is no way for an author to modify an email based on it being detected as spam (or otherwise) after is has left the author's control.