xml generate and email send