add the mail and quartz function