PDF generation + email is working