How to send email attachments in Awesome Enterprise

There are two methods to send email attachments in Awesome Enterprise,

1)Using a file from WordPress Media

Use this method when the email attachment is a WordPress Media post.


When creating attachments sub array, pass the “Post Id” of required Media as file” parameter as shown in below code snippet:


2)Using a file from Awesome Apps folder

Use this method if the file is uploaded to the Awesome Apps folder. In this case, since the file is not uploaded into WordPress Media  Post Id is not available.


When creating attachments sub array pass the physical file path as a parameter as shown in below code snippet:


Updated on Jun 19, 2021