You are serving the file whose name is returned by `BaseMailer::generateMessageFileName()`. You may just check the characters in this. Or a simpler approach is to throw exception if found `/` or `\` in the file name.