SSP-1185 - Refactored email/print Plan code for reuse in templates.