Skip to content
Snippets Groups Projects
Commit 4c7d43ec authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt
Browse files

prevent 'Re: Re:' stacking

parent 7304ac95
No related branches found
No related tags found
No related merge requests found
......@@ -231,7 +231,12 @@ class AccountsController extends Controller
$message = $mailbox->getMessage($messageId);
if (is_null($subject)) {
$headers['Subject'] = 'Re: ' . $message->getSubject();
// prevent 'Re: Re:' stacking
if(strcasecmp(substr($message->getSubject(), 0, 4), 'Re: ') === 0) {
$headers['Subject'] = $message->getSubject();
} else {
$headers['Subject'] = 'Re: ' . $message->getSubject();
}
}
$headers['In-Reply-To'] = $message->getMessageId();
if (is_null($to)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment