mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Strip email signatures from Mailbox
Summary: thanks mailbox Test Plan: unit tests Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10629
This commit is contained in:
parent
410c2ecbfd
commit
e333017c3e
2 changed files with 13 additions and 0 deletions
|
@ -103,6 +103,13 @@ final class PhabricatorMetaMTAEmailBodyParser {
|
|||
'',
|
||||
$body);
|
||||
|
||||
// Mailbox seems to make an attempt to comply with the "standard" but
|
||||
// omits the leading newline and uses an em dash?
|
||||
$body = preg_replace(
|
||||
"/\s*\xE2\x80\x94 \nSent from Mailbox\s*\z/su",
|
||||
'',
|
||||
$body);
|
||||
|
||||
// HTC Mail application (mobile)
|
||||
$body = preg_replace(
|
||||
'/^\s*^Sent from my HTC smartphone.*/sm',
|
||||
|
|
|
@ -66,6 +66,7 @@ EOEMAIL;
|
|||
|
||||
private function getEmailBodies() {
|
||||
$trailing_space = ' ';
|
||||
$emdash = "\xE2\x80\x94";
|
||||
|
||||
return array(
|
||||
<<<EOEMAIL
|
||||
|
@ -176,6 +177,11 @@ OKAY
|
|||
> -----Original Message-----
|
||||
>
|
||||
> ...
|
||||
EOMAIL
|
||||
,
|
||||
<<<EOMAIL
|
||||
OKAY {$emdash}{$trailing_space}
|
||||
Sent from Mailbox
|
||||
EOMAIL
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue