Email Setup
This guide explains how to configure email delivery for Advanced Spreadsheets and Reporting's automated report distribution.
Overview
Email delivery allows you to:
- Send generated reports directly to recipients
- Attach reports in various formats (PDF, Excel, etc.)
- Automate delivery schedules
Prerequisites
Before configuring email delivery:
- Email Account: At least one email account must be set up in Business Central
- Email Scenario: The app adds the Financial Reports Print email scenario
- Connector: Any Business Central email connector must be working
Email Account Setup
Verify Email Accounts
- Search for Email Accounts in Business Central
- Verify you have at least one configured account
- If not, set up an account following Business Central documentation
Supported Account Types
Any Business Central email connector works, for example:
- Microsoft 365
- Current User
- SMTP
Email Scenario Configuration
Understanding Email Scenarios
Email scenarios in Business Central allow different features to use different email accounts. The app adds its own scenario.
The Financial Reports Print Scenario
The scenario is: Financial Reports Print
Assigning an Account to the Scenario
- Search for Email Scenario Setup
- Find Financial Reports Print in the list
- Select the email account to use
- Save the configuration
If not assigned, the default email account is used.
Configuring Print Jobs for Email
Basic Email Configuration
In your print job:
| Field | Setting |
|---|---|
| Output | |
| recipient@example.com | |
| File Format | PDF (or other) |
Email Field Details
- Enter the full email address
- For multiple recipients, separate the addresses with
; - The field holds up to 100 characters and is passed verbatim to the email message; use a distribution list for long recipient lists
File Format Considerations
| Format | Email Attachment |
|---|---|
filename.pdf with application/pdf |
|
| XLSX | filename.xlsx with application/vnd.openxmlformats... |
| DOCX | filename.docx with application/msword |
| HTML | filename.html with application/html |
| XML | filename.xml with application/xml |
Email Content
Automatic Email Content
The email content is generated automatically:
Subject: [Financial Report Description] from [Company Name]
Example: "Monthly Income Statement from CRONUS International"
Body: See attached financial reports from [Company Name]
Attachment: Report file named: <Run ID>.<yyyy-mm-dd>-<yyyy-mm-dd>.<FORMAT>
Example: MonthlyPL.2024-01-01-2024-01-31.PDF
Customization
Currently, email content is not customizable through the UI. The format is standardized for consistency.
Testing Email Delivery
Manual Test
- Create a print job with Output = Email
- Enter your own email address
- Filter the Print Jobs list so only this job is shown and click Manual Run All (Manual Run Single always downloads the file instead of emailing it)
- Check your inbox
Troubleshooting Test Failures
If the test fails:
- Check the message displayed ("Emailing to failed")
- Review email account configuration
- Verify email scenario assignment
- Check the Email Outbox and Sent Emails pages
Common Configurations
Daily Report to Manager
Run ID: DailyMgr
Financial Report: DAILY-KPI
From Date Formula: <-0D>
To Date Formula: <-0D>
Output: Email
Email: manager@company.com
File Format: PDF
Weekly Report to Team
Run ID: WeeklyTeam
Financial Report: WEEKLY-SALES
From Date Formula: <-1W>
To Date Formula: <-0D>
Output: Email
Email: salesteam@company.com
File Format: XLSX
Monthly Report to Executives
Run ID: MonthlyExec
Financial Report: MONTHLY-PL
From Date Formula: <-CM>
To Date Formula: <CM>
Output: Email
Email: cfo@company.com
File Format: PDF
Multiple Recipients
Option 1: Several Addresses in One Job
Separate the addresses with ; in the Email field (100 characters in total):
Email: cfo@company.com;ceo@company.com;controller@company.com
Option 2: Distribution List
Use an email distribution list:
Email: finance-team@company.com
(where finance-team is a distribution group)
Error Handling
Email Failures
If email delivery fails:
- Interactive runs show the message "Emailing to [address] failed"; the run itself is not aborted
- Scheduled runs (Job Queue) cannot show messages, so the Job Queue Log Entry records success even when the email failed
- Check the Email Outbox (failed and pending emails) and Sent Emails pages to confirm delivery
- Check email account is working
- Verify recipient address is valid
Common Errors
| Error | Cause | Solution |
|---|---|---|
| "Emailing to ... failed" | Account not configured or connector error | Set up the email account; check Email Outbox |
| No error but no email | Scheduled run failed silently, or scenario not assigned | Check Email Outbox / Sent Emails; assign the email scenario |
| Attachment missing | Report generation failed | Check report configuration |
Best Practices
Recipients
- Use Valid Addresses: Verify email addresses are correct
- Distribution Lists: Use groups for multiple recipients
- Test First: Send to yourself before production
Timing
- Business Hours: Consider recipient time zones
- Server Load: Avoid peak usage times
- No Automatic Retry: An email failure does not fail the job, so the Job Queue will not retry it; monitor the Email Outbox
Format Selection
- PDF for Viewing: Best for final reports
- Excel for Analysis: When recipients need to manipulate data
- HTML for Quick View: Lightweight, web-friendly
Security Considerations
Data Sensitivity
- Reports may contain sensitive financial data
- Ensure recipients are authorized
- Consider encryption for highly sensitive reports
Email Account
- Use dedicated service accounts
- Follow organization's email security policies
- Monitor for unauthorized use
Troubleshooting
No Email Sent
- Verify email account is configured
- Check email scenario assignment
- Test email account directly
- Review Email Outbox and Sent Emails (the Job Queue log shows success even when emailing failed)
Wrong Attachment
- Verify file format setting
- Check report configuration
- Test with manual run
Email to Wrong Address
- Verify print job email field
- Check for typos
- Update job configuration