rename addAttachment Hook to beforeAddAttachmentToMail
move calling Hooks to a protected function
move adding files to a protected function