Fixed error not allowing mail to be sent