/ Published in: PHP
If reading email from a POP box with PHP, you can use this to strip out signatures (ones that are delimited with the proper '--' notation). It will only strip the last signature of an email, in case someone enters a '--' intentionally elsewhere.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function strip_signature($strEmailContent) { |\n\r)--\s*(?:\r|\n| |\n\r))/', $strEmailContent, -1, PREG_SPLIT_DELIM_CAPTURE); return $strEmailContent; }
URL: http://www.addedbytes.com