Answer the question
In order to leave comments, you need to log in
How to discard the quoted part of the letter when parsing?
Hello.
Question about beast practice in the field of parsing letters.
I am implementing a functionality in which users in the help desk system can simply respond to letters to communicate with the site support service. Because Since users, as a rule, include the quoted letter during the response, then it became necessary for the script to discard a piece of the correspondence history when parsing.
How to do it right?
So far, I have come up with only in letters sent to the client to include a certain block of html code and always discard everything that comes after it when parsing.
Answer the question
In order to leave comments, you need to log in
I started inserting anchors into letters from above the original letter, such as the character set "########...". And on them I already discard everything below.
You know the text of the letter... delete it at POST
or users change the text in the letter? :)
Вряд ли это можно сделать как-то правильно, у всех почтовых сервисов/программ свой вид цитирования, кто-то отделяет символами, кто-то с помощью css цитату выделяет.
Скажу больше, есть программы, которые цитату не в конец письма кладут, а в начало и письма имеют вид:
"Здравствуйте, вы писали 23.11.2015 23:43
Цитата
Текст"
Хотя могу ошибаться, сам был бы счастлив найти решение, т.к. актуально)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question