add send mail in log_payment function