Our requirement is based on a event the details are to added to a pdf and it should be automatically attached and send as a mail to external system. Sending a mail is working. But how to automatically generate the pdf and attach to the mail ?