fixed undefined in email title
re-arranged to match secrets order