phproject
phproject copied to clipboard
Any way to completely ignore copied email in replies from IMAP?
When a user replies by email, their email automatically places a copy of the previous email after the email they are sending.... normal email behavior. Is there any way to remove that when IMAP is pulled so that the email being replied to doesn't show up in the comment when IMAP pulls it? I've been trying some different truncate options but still haven't had success.
There are a few things we could try, but this is actually an unsolved problem with email still. There's no standard way that replies are formatted that are consistent between clients, so detecting where the new content ends is very difficult.
We've found that the default truncate line configuration works fairly well for GMail, but have had some issues with other clients. Do you know what clients are sending the emails that show this issue on your site?
I haven't looked at method used to truncate emails yet. Planning on doing it once I finally have some free time. Out of curiosity, just shooting in the dark here... Would it be reasonable to assume I could use some regex to find the first line of a reply, then ignore the rest of the following lines that follow? Gmail uses a pretty standard way of quoting the previous emails. I figure if I get a chance, that's one place I would start. Its widely used by individuals and businesses... it also would solve my problem :-) if I could get it to work.
In theory that could work, yes. The main reason I don't already do that is that it changes between different email clients and different languages, but it should work at a basic level if everyone is using the same email client and language. Certainly a decent solution for an individual organization.
Oh... right, there are more languages than just English. If I were to get it to work for my organization, I don't think the solution I'm currently picturing would be widely useful enough for a pull request to the main repo... probably just a fork for my own use. I'll keep thinking on this.