M
M
Maxim Smirnov2015-11-23 23:34:46
PHP
Maxim Smirnov, 2015-11-23 23:34:46

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

3 answer(s)
M
Maxim Smirnov, 2016-08-15
@MaxiStyle

I started inserting anchors into letters from above the original letter, such as the character set "########...". And on them I already discard everything below.

A
Andrew, 2015-11-23
@R0dger

You know the text of the letter... delete it at POST
or users change the text in the letter? :)

A
Anton, 2015-11-23
Buichik @RoAChik

Вряд ли это можно сделать как-то правильно, у всех почтовых сервисов/программ свой вид цитирования, кто-то отделяет символами, кто-то с помощью css цитату выделяет.
Скажу больше, есть программы, которые цитату не в конец письма кладут, а в начало и письма имеют вид:
"Здравствуйте, вы писали 23.11.2015 23:43
Цитата
Текст"
Хотя могу ошибаться, сам был бы счастлив найти решение, т.к. актуально)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question