问题
I'm using Flask-Mail to send email notifications for events and currently I'm encountering a problem where if two emails of the same subject end with the same thing (which is a rather niche circumstance, but definitely necessary to consider nonetheless), the ending part of the second email will be collapsed by certain mail clients (gmail, for example) that think it's a sign-off or signature or whatever. How do I prevent this?
Currently what I'm doing is generating a random sequence of letters and putting it in a <span style="display:none">...</span>
and appending that to the email so the client thinks it's a different footer, but that feels really hacky and I want to know if there's a proper way to do it.
回答1:
After doing some research, it does not seem as though gmail gives you an option to turn this off. All of the articles written on this topic suggest making your footer unique, which is exactly what you are doing.
Furthermore, this option means that the content of the email does not change at all. This seems to be the best solution.
回答2:
There is an option in Gmail which allows you to turn off conversation view.
How the grouping occurs is:
- The subject must be similar
- The sender must be a part of the thread OR in-reply-to must be used
Now to save space, Gmail condenses texts that are same, which is what you see. If you want to turn off conversation view in desktops just navigate to setting -- > generals (tab) for desktop and use the radio button select and press save.
If you are after other devices check this link out.
来源:https://stackoverflow.com/questions/55987865/prevent-end-of-email-from-being-collapsed