How to integrate a thank you email with file