Updated function order in mymailer class for better readability