fix funciton send mail