inbox icon indicating copy to clipboard operation
inbox copied to clipboard

Stripping Quotes from plain text email replies

Open SySagar opened this issue 1 year ago • 8 comments

So I was using the latest app to have a kind of conversation and I found that if sender is sending message as a reply it is exactly appearing someting like this. Considering this is a conversation I think it would be better if we can only put the message only rather than the separate metadata.

Capture

SySagar avatar Aug 15 '24 13:08 SySagar

I am pretty much sure you edited the reply while sending from gmail otherwise it should automatically strip the reply

BlankParticle avatar Aug 15 '24 13:08 BlankParticle

I simply hit the reply and wrote some text.

https://github.com/user-attachments/assets/a6bba0a3-120e-4211-ae0e-04509c397bd0

SySagar avatar Aug 15 '24 13:08 SySagar

image something might be off with your gmail setup, It works as expected on my side

BlankParticle avatar Aug 15 '24 14:08 BlankParticle

Also that part is not metadata, its part of email, we have mechanism which strip out that part, but if your email is not formatted properly it fails

BlankParticle avatar Aug 15 '24 14:08 BlankParticle

ok So I think I got the issue. When sending email we can either set a plain text or rich text. In case of rich text it works but in case of plain text it doesnt.

see both these types os senidng one with '>' and other with '|':

Capture

the output:

Capture

I think somehow we should handle this internally becuase I checked some of the emails provide palin text as default or maybe manually somebody might have put. Apart from these two cases I didn't find anything else.

SySagar avatar Aug 15 '24 14:08 SySagar

There is nothing we can do with plain text, the internal library cant handle every edge case as there is no standard to follow

Still I will keep this issue open for tracking to see if we can do anything

BlankParticle avatar Aug 15 '24 14:08 BlankParticle

@SySagar this is what we use to strip: https://github.com/un/packages/tree/main/packages/mailtools maybe you spot something we missed

OmarMcAdam avatar Aug 19 '24 06:08 OmarMcAdam

sure will look into this.

SySagar avatar Aug 19 '24 11:08 SySagar