change the sendmail to a multithread in background.