Added cap to filename header

Review Request #8646 — Created Jan. 20, 2017 and submitted — Latest diff uploaded

Information

Review Board
master
7a9e403...

Reviewers

Clients occasionally dump a ton of data in the filename e-mail headers, which many SMTP servers reject.

To combat this, I have added a limit to the number of characters (8192 characters) that these filename headers may contain. Once this limit is reached, additional filename headers are not added.

Sent e-mail through gmail servers; cap worked correctly.

Unit test was added that checks for correct logger warning, as well as testing the correct overflow behavior.