Updated for file-based mail saving