modif sendmail func