Email Setup & Queue: Filters
Email configuration, auto-send, mail queue, and troubleshooting
Filters
Below is a description of some of the mail filter combination you can use to search for emails.
Contracts
- report_name — Enter all or part of a known attachment file name and/or email address to locate emails. Use this with the "From" and "To" date fields to narrow down the search further. contact@demo
Invoices
- Group Code (Combined) — Enter a "Client Code" to find emails sent to a specific client, alternatively enter the "Group Code" if you are using the group emailing function for the client/s. The ID column will display either the "Group Code" or "Client Code" depending on which email rule was applied to send the invoice. Client Code Invoice No
- Group Code (Periodic Lease) Client Code Invoice No
- Group Code (Recharge) Client Code Invoice No
- Group Code (Recharge Fuel) Client Code Invoice No
ID Type Filters
Limit
The "Mail Limit" field allows you to set the limit of emails being sent. The default value for new jobs is "blank", but can be edited.
When set
When a mail limit is set and the number of emails created in the mailQuery batch falls under the "Mail Limit" amount, the job will run successfully.
If the email batch volume exceeds the set limit, the job will fail and generates an error email with the following error “Email Limit exceeded – batch total xxxx. Please re-set Mail Limit amount and re-run scheduled job.”
The same error is also displayed in the “Message” column of the affected row in the Scheduler / Queue tab.
Error recipients
If you are setting a "Mail Limit", add your email address, or your businesses IT Support email address to the list of Error recipients, so that you can be alerted if the job fails.
mailQueue Workflow Illustration
[Mail Limit]
Validations and Alert messages
Below are alerts you may see during this process and the reasons why they have happened.
- Validation email Email Limit exceeded – batch total xxxx. Please re-set Mail Limit amount and re-run scheduled job. If the email batch volume exceeds the set limit, the job will Not create any emails Send the Error recipients the email message shown here Update the job's "Status" to 'failed' If your process volume has grown and the limit set is too low, increase the amount in this field and re-set the job to 'Pending' status. The batch total in the error email will help you decide if this is the case. If you think there may be an error in the query used by this job that is creating too many emails, contact Catch-e support to help you analyse this.
Troubleshooting tips when "Mail Limit" is used
The batch total is calculated by counting the ‘mailgroupby’ field. Therefore, the batch total of the job can only be determined at run time.
If you are analysing a query used in a mailQuery job, check if it is using library placeholders, as the dataset may return more records than the scheduler job would.
I.e. if a HAVING clause is required, it will not process outside of the scheduler (see below).
Including derived fields in WHERE or HAVING clause
Derived fields can't be included in the WHERE or HAVING statements of the SQL. To overcome this, you can include a special comment 'having_clause' followed by the required logic. E.g.
## having_clause $row['service_overdue'] == 'yes'or## having_clause $row['service_overdue'] == 'yes' && $row['service_overdue_days'] > 10Note, PHP code is used in the above, so 'is equal to' operator is == not =
Send Block Flag
The mailsendblock_flag) can be used to enable emailing in various environments.
The system level lock file, '../system/lockfiles/mail.lock' can also be added to provide further security against accidental emailing. Only a Catch-e system administrator can add or remove this file.
For emailing to be enabled, the mailsendblock_flag) must be set to 'no', and no mail.lock file should be present. If either of these conditions are not met, the system will act as though the emails have been sent, but they will not actually be sent.
Warning Message
If any system other than LIVE has emailing enabled, a warning message will flash in RED on the screen header - that's good to know!
Default Environment Email settings
- LIVE default
mailsendblock_flag = 'no'
mail.lock file = 'not present'
- SUPPORT default
mailsendblock_flag = 'no'
mail.lock file = 'present'
(Emails will not send, as a lock file is present.)
(To activate email in SUPPORT, a Catch-e administrator must remove the lock file.)
- STAGING default
mailsendblock_flag = 'yes'
mail.lock file = 'present'
(Emails will not send, as the flag = 'yes'.)
(Emails will not send, as a lock file is present.)
(To activate email in STAGING, the control must be changed and a Catch-e administrator must remove the lock file.)
- TEST default
mailsendblock_flag = 'yes'
mail.lock file = 'not present'
(Emails will not send, as the flag = 'yes'. This can be turned off temporarily to allow for testing.)
Troubleshooting
Large email batch does not send
Catch-e support may check the mail buffer sizing if large volumes of emails are being sent.
The buffer sizes are currently as follows;
- 50
- 5000
- 5000
Failed Scheduler Jobs
Scheduler Jobs to report failed emails
A scheduler report can be sent to you that provides information including the intended email batch-item number, email address, delivery date and delivery details of emails that have failed to send.
You can then locate the email\s in question in the mail queue, by entering the "Batch No" and "Item No". The email address can then be corrected and the email resent.
If your system is configured to use Simple Mail Transfer Protocol (SMTP), set-up jobs 1-3.
If your system is configured to use Amazon Simple Email Service (SES), set-up jobs 2 and 3 only.
Report Example
Edit an email
Qualifiers
- You have a Pending, Sent, Failed or Deleted email that you want to edit and re-send
- The email is in text format (html emails cannot be edited)
Process
- Go to System / Mail Queue
- Filter the Mail Queue to locate the email you want
- Click on the "Batch-Item" hyperlink to open the email window.
- Edit the available fields as required
- To:
- Cc:
- Bcc:
- Subject:
- Message (html email message content cannot be edited)
- Click on **
- The email status will be updated back to 'Pending'
- Update your Status' filter to 'Pending'
- Click on **
- Click on **
Delete pending emails
Qualifiers
- You have pending emails in the Mail Queue that you do not want to send
Process
- Go to System / Mail Queue
- Status - select 'Pending'
- Apply other filters you need to limit the selection to the record to delete
- Click on **
- Click on **
Add or remove email recipients
Qualifiers
- You want to add to or remove from the list of recipients
- Send Mail - must be checked
Process
- Find the job
- Navigate to the Scheduler / Job tab
- Click on **
- To Add
- Recipients: Type - choose from 'to', 'cc' or 'bcc'
- Recipients: Name - enter the name
- Recipients: Address - enter the email address
- Repeat for each recipient you want to add
- To Remove
- Recipients: delete - click the delete link for any recipients you want to remove
- Click on **
Add or remove report queue recipients
Qualifiers
- You are creating or changing an executeQuery) job
- Report Queue - is checked
- You want to add to or remove from the list of recipients
Process
- Find the job
- Navigate to the Scheduler / Job tab
- Click on **
- To Add
- Recipients: User - enter or lookup a user record
- Recipients: Name - will populate from selected user record
- Recipients: Address - will populate from selected user record
- Recipients: Notify - un-check if email advice is not required.
- Repeat for each recipient you want to add
- To remove new users
- Recipients: User - blank out the field detail, the remaining fields will de-populate
- To remove saved users
- Recipients: delete - click the delete link for any recipients you want to remove
- Click on **
Add report queue recipients
- Recipients: User - enter or lookup a user record
- Recipients: Name - will populate from selected user record
- Recipients: Address - will populate from selected user record
- Recipients: Notify - un-check if email advice is not required.
- Repeat for each recipient you want to add
Add recipeints
- Recipients: User - enter or lookup a user record
- Recipients: Name - will populate from selected user record
- Recipients: Address - will populate from selected user record
- Recipients: Notify - un-check if email advice is not required.
- Repeat for each recipient you want to add