refactor Mailer. PageLock does not require refactoring