Pages: 1
RSS
Delete text string from incoming message
 
Hi,
Is it possible to add in the filter the operation of deleting the search string from the message?
After the update from version 7.6 to 8.6, I have a messages (HTML) in which I do not see the content, only the footer.
After a small investigation, I discovered that the problem is the wrong HTML code in this messages.
This code is just before the footer. I would like to delete this piece from the original message using the filter.

I know that there is a filter that has the condition "Message source -> contains".
But in the output operation there is no "Delete that string" option. It would be very useful
 
Quote
Mefisto wrote:
Is it possible to add in the filter the operation of deleting the search string from the message?

Not internally in The Bat, as far as I know.

You can use filter actions to save the attachments (or the whole message) and then use an external action to edit the saved file, but I don't think there's a way to then replace the message.html attachment with the edited version...

Maybe you could extract the attachments to a folder, then run an external action to edit the message.html there, then use the "Create a formatted message" filter action to create a duplicate of the original message (with attachments stripped), and use a macro in the formatted message to (re)attach the edited attachments. I've never tried anything like this and I'm not confident that it will work, but it might be worth a try.

(to edit the html file externally, you could use a batch-capable text manipulation tool. You can probably find a suitable one in this review of such utilities: https://www.smashingmagazine.com/2009/04/25-text-batch-processing-tools-reviewed/ )

Quote
After a small investigation, I discovered that the problem is the wrong HTML code in this messages.
This code is just before the footer. I would like to delete this piece from the original message using the filter.

Well, if it is a common problem, maybe you could submit this issue to Ritlabs and ask if they could work around it in their HTML renderer? That way we all benefit! :-)
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
 
Thanks Daniel.
I thought it would be much easier. I submit this problem to Ritlabs support.
Pages: 1