Strip signatures and replies from emails

后端 未结 8 1209
傲寒
傲寒 2020-12-22 19:34

I\'m currently working on a system that allows users to reply to notification emails that are sent out (sigh).

I need to strip out the replies and signature

相关标签:
8条回答
  • 2020-12-22 20:05

    If you want something powerful & robust, and don't mind reading academic publications, you might check out this:

    • Learning to Extract Signature and Reply Lines from Email

    Here's the homepage for one of the authors, with more info & some downloads:

    • Vitor R. Carvalho - Software and Datasets - (Vitor Carvalho)
    0 讨论(0)
  • 2020-12-22 20:10

    I don't believe you can do this reliably (signatures used to begin with '--' but I don't see that anymore). Perhaps you're better off asking people to reply inbetween text headers and then simply strip the reply from this ? It's not elegant, but perhaps more reliable.

    e.g.

    REPLY BETWEEN HERE -->
    
    AND HERE -->
    

    so you'd simply look for the required headers above and take what's inbetween.

    0 讨论(0)
提交回复
热议问题