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

ID TypeTypeAttachedDescription
Contracts
Contract IDReportsdriver_fbtFilter by driver report.
Contract IDReportsdriverfbtoperatingFilter by driver report.
Contract IDReportsnovated_driverFilter by driver report.
Contract IDReportsnovateddriveroperatingFilter by driver report.
Contract IDReportsnovateddriverbudgetedFilter by driver report.
Contract IDReportsnovateddriverbudgeted_operatingFilter by driver report.
Contract IDReportsnovateddriverbudgetedwithfundsFilter by driver report.
Contract IDReportsnovateddriverbudgetedoperatingwith_fundsFilter by driver report.
Drivers
Driver IDNotificationLogin email
Employees
Driver IDNotificationLogin email.
Driver IDReportEmployee Package Activity Statement email.
Driver IDReportEmployee Package Transactions.
Payments
Payment NoPaymentpdfperiodicfinanceFilter by Type, Attached or ID.
Payment NoPaymentpdfperiodicinsuranceFilter by Type, Attached or ID.
Payment NoPaymentpdfperiodicmanagement_feeFilter by Type, Attached or ID.
Payment NoPaymentpdfperiodicroadside_assistanceFilter by Type, Attached or ID.
Payment NoPaymentpdfperiodicsinglepostingclassFilter by Type, Attached or ID.
Queue
Queue IDReport Queue emails.
Quotes
Quote IDReportscustomQuote emails. Quote attachments usually contain the Quote ID in the attachment name.
Quote IDReportsdealerquoterequest_*Dealer Quote Request emails. Filter by Quote ID
Quote IDNotificationPricing email.
Users
User IDReportUser Login email
User IDNotificationPassword Reset email.

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'] > 10

Note, 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;

  1. 50
  2. 5000
  3. 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.

System / Scheduler
Run Order
1
2
3

Report Example

Edit an email

Qualifiers

  1. You have a Pending, Sent, Failed or Deleted email that you want to edit and re-send
  2. The email is in text format (html emails cannot be edited)

Process

  1. Go to System / Mail Queue
  2. Filter the Mail Queue to locate the email you want
  3. Click on the "Batch-Item" hyperlink to open the email window.
  4. Edit the available fields as required
  5. To:
  6. Cc:
  7. Bcc:
  8. Subject:
  9. Message (html email message content cannot be edited)
  10. Click on **
  11. The email status will be updated back to 'Pending'
  12. Update your Status' filter to 'Pending'
  13. Click on **
  14. Click on **

Delete pending emails

Qualifiers

  1. You have pending emails in the Mail Queue that you do not want to send

Process

  1. Go to System / Mail Queue
  2. Status - select 'Pending'
  3. Apply other filters you need to limit the selection to the record to delete
  4. Click on **
  5. Click on **

Add or remove email recipients

Qualifiers

  1. You want to add to or remove from the list of recipients
  2. Send Mail - must be checked

Process

  1. Find the job
  2. Navigate to the Scheduler / Job tab
  3. Click on **
  4. To Add
  5. Recipients: Type - choose from 'to', 'cc' or 'bcc'
  6. Recipients: Name - enter the name
  7. Recipients: Address - enter the email address
  8. Repeat for each recipient you want to add
  9. To Remove
  10. Recipients: delete - click the delete link for any recipients you want to remove
  11. Click on **

Add or remove report queue recipients

Qualifiers

  1. You are creating or changing an executeQuery) job
  2. Report Queue - is checked
  3. You want to add to or remove from the list of recipients

Process

  1. Find the job
  2. Navigate to the Scheduler / Job tab
  3. Click on **
  4. To Add
  5. Recipients: User - enter or lookup a user record
  6. Recipients: Name - will populate from selected user record
  7. Recipients: Address - will populate from selected user record
  8. Recipients: Notify - un-check if email advice is not required.
  9. Repeat for each recipient you want to add
  10. To remove new users
  11. Recipients: User - blank out the field detail, the remaining fields will de-populate
  12. To remove saved users
  13. Recipients: delete - click the delete link for any recipients you want to remove
  14. Click on **

Add report queue recipients

  1. Recipients: User - enter or lookup a user record
  2. Recipients: Name - will populate from selected user record
  3. Recipients: Address - will populate from selected user record
  4. Recipients: Notify - un-check if email advice is not required.
  5. Repeat for each recipient you want to add

Add recipeints

  1. Recipients: User - enter or lookup a user record
  2. Recipients: Name - will populate from selected user record
  3. Recipients: Address - will populate from selected user record
  4. Recipients: Notify - un-check if email advice is not required.
  5. Repeat for each recipient you want to add