Strip out certain text from email messages with a php script or javascript.
Specifically, take a php string variable (say, $email_body) and do this: remove html tags; and also remove text between "--" & "Transfer-Encoding: quoted-printable" (including this text); and also remove text between "--" & "Transfer-Encoding: 7Bit"; and also remove repeating occurrences of non-alphanumeric characters (i.e. characters such as ~-<>.+ and so forth), in other words convert a substring such as "------------------" to read: "-".
Script can be php or a javascript that can be run from within php.
Here are some examples:
If $email_body = "<tr><td>Welcome</td></tr>" then $revised_email_body = "Welcome"
If $email_body = "------_=_NextPart_003_01CBD2E2.2042366F Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Guest!" then $revised_email_body = "Hello Guest!"
If $email_body = "----------- Hello! ----------" then $revised_email_body = "- Hello! -"