Fixed. Here’s what was wrong and what changed in admin/includes/robodesk-fetch-tickets.php:
1. Signature/quote not being cut (plain-text case)
– The — separator pattern used [srn]+ (requires whitespace after the dashes), but the earlier -{10,} divider pattern already cut first, leaving — at end-of-string — so it never matched and the signature/quoted thread survived.
– Fixed: merged the dash patterns into /[rn]+s*-{2,}s*/ and added patterns for the Gmail quoted-header format (Name <email> / 12:04 PM / to recipient), plus “Reply above this line” markers.
– Verified: your exact message now cleans down to just the new content — quoted thread and signature gone.
2. Bold/italic not showing
– This happens because your test emails are being read from the plain-text part (that’s also why 1. 2. 3. and – markers appear literally — the mail client baked them into the text part).
– The HTML part (which has the real <b>/<u>/<i> and clean list lines) is only picked up by the new robodesk_find_email_text_part() fetch logic.
– I added a log line: Fetched email body part X (HTML/PLAIN) for #N. Fetch once and check the log — if it says (PLAIN), that email truly had no HTML body; if (HTML), formatting will now be preserved.
Important: existing tickets/comments are not re-processed — they were created by the older fetch code and already stored as plain text. You need a fresh fetch for the new logic to apply. If you want, I can add a small “re-import” routine that re-fetches the last N emails and replaces existing comment content.
The dashboard renders reply.message as raw HTML (robodesk-dashboard.js:3744), so once the HTML body is stored, bold/italic/lists will display correctly.
—
———————————–
Best to you Bishal Rauniyar
SWE @ Code Pixelz Media
Need web help? Let’s discuss .