Added auto email sending feature