refactored BaseMailer about message file name generation.