What You’ll Learn
- Disabling PDF attachments with a code snippet
- Creating HTML-only email reports
- Installing and using the HTML email template
- Customizing the email template branding
Extension Add-on - This add-on provides standalone functionality within MainWP Dashboard. No third-party plugins required.
In this tutorial, we will quickly go over how to create a Pro Reports report using only the email body and how to skip attaching the PDF to the email. Inspiration came from this Facebook discussion in Admin Bar group, where one MainWP user shared their HTML template and others expressed a desire for a simple HTML-only report.
Pro Reports extension was designed to have the report data in the PDF attachment. For this purpose, we will use a code snippet to disable the PDF creation and send only an HTML report. To do this:
- Copy the snippet
- Paste the code into the PHP tab
- Click save
Let’s start
- Download the template (external Dropbox link) and place it in
/wp-content/uploads/mainwp/report-email-templatesdirectory. Once uploaded, the template will be available in the Report template dropdown. - Go to the MainWP Dashboard > Clients > Pro Reports and go to the Create Report tab
- In the Report Settings section:
- Enter the Report title
- In the Report type dropdown, choose One-time
- In the Report date range, pick the starting and ending dates for the report
- Enter the Send email from data (in most cases, your email address and name)
- Enter the Send email to data (in most cases, your client email address and name. Tokens are allowed here and can be left at their default values,
[client.email]and[client.name]if they have been set on the Client page or in Site settings) - Optionally, enter the Reply-to email and information
- Enter the Email Subject
- Enter the Email message
- Select the Email template you uploaded earlier
- Select the wanted site(s) in the metabox on the right
- Once you are sure that the report is ready and want to send it, click the Send Now button
Related Resources
- Pro Reports Extension - Main Pro Reports documentation
- Create Custom Report Templates - Build custom PHP templates
- Available Pro Reports Tokens - Complete token reference