Attach PDF function in the email notifications is not working