Added the mail method
It takes in a boolean variable
if True, sends a success message
False, sends NOT successful message