This project shows the basic usage of generating a report and attaching it to an email using Java Mail. The project is set up to use Gmail by default and all you need to do is enter your Gmail password and account name to get the sample working.
Open the Command Line Project
- Open Catapult. (Found under Start -> All Programs -> Windward Studios -> Windward Reports Java Engine -> Catapult – Windward sample programs)
- In the Catapult Menu, click the Command-Line Tab.
- Click the Email Example IntelliJ Project File button.
Run the code
1. Type in your Gmail email for username and fill in password and who you are sending the email to
2. On the toolbar on the top of the IntelliJ window, click the run icon.
Note: If you get an error message stating ‘cannot start compiler: the SDK is not specified for module “RunReport”’, your Java Development Kit is not correctly configured with IntelliJ. See our documentation on installing and Configuring IntelliJ for assistance.
3. Open the email in the email account you sent it to and open the attachment.