add flow chart for mail loop