EMAILPLT-157 Fix CAS integration

Alternate implementation to https://github.com/Jasig/email-preview/pull/52/files