Email Queries, SES & Certificates: SMTP Setup

Mail import/query, AWS SES, SMS, SMTP, and certificate of currency

SMTP Setup

Simple Mail Transfer Protocol (SMTP) is Catch-e's original email protocol.

If you want to use, or change-over to Amazon SES or SendGrid, contact your Account Manager to arrange this.

Domain settings

Visit the Domain Setup page for an explanation of the domain configuration that is used for SMTP emailing.

SPF record

Visit the SPF records page for details of the spf record that needs to be stored on your domain if you use SMTP emailing.

Global Controls

Check the controls below use the values shown if you are using SMTP emailing.

Setup / Reference Data → gb_controls)
Module
gb

| gb | mailtransmissionprovider | smtp | Choose which emailing protocol you want to use to send emails. You can either use 1. 'ses' - Amazon Simple Email Service (SES). This is the recommended method. You will need to set-up a DKIM key to verify the email's domain. 2. 'smtp' - For Simple Mail Transfer Protocol (SMTP). You will need to set-up an SPF record to verify the email's domain.

The Catch-e System was developed to use only SMTP at first. SES was introduced later and is now our recommended protocol for clients. |
| gb | mailsenderdomainsenforcingflag | yes | Set to 'yes' to control the status of Domain enrolling of SPF Records. |
| gb | emailattachmentsmaxsizein_bytes | 7864320 | Your emails will switch to a URL link if the combined size of the attached files is larger than the specified maximum size. We recommend a maximum of '7864320' as the Amazon SES feature enforces a mail size limit of 10MiB. If this control is set to a higher value, emails will fail if the size limit of 10MiB is exceeded. If you are using SMTP, this can be set to a higher value if desired. Note: Amazon SES converts the attached files to a binary file before attaching it to the email which can increase in size when converted. For example: a file of size 7.5 MB when converted can go over 10MiB, hence we recommend using maximum of '7864320' so the file is still less than 10MiB in size after conversion to binary file. |

Certificate of Currency

Send an email to the driver that has an attached Certificate of Currency document from the Contracts / Events tab.

This event type also supports the addition of further static documents and the "Attach" function.

This event type can also be used for more than one insurers Certificate of Currency document.

This event type can also be configured for individual channels that use different insurers, allowing each channel to have its own separate Certificate of Currency document.

This event type would only be appropriate if the Contracts / Insurance "Policy Owner" is an Insurance supplier that you offer a managed insurance product for.

Troubleshooting

Tip: Visit the main Troubleshooting page for a list of all the available problem-solving tips.

Setup

Download this request form COC Event Email Request and send it to Catch-e Support if you want to set-up a Contract Event Email.

Check the COC Posting Class settings

  1. Go to Accounts / Posting Classes
  2. Class Code - enter 'COC' and hit [Enter]
  3. Check the following recommended settings
  4. Event - checked
  5. Event Completed - checked
  6. System Event - un-checked
  7. Event View Flag - checked

Compile a zip file to generate a Certificate of Currency pdf

Configure a zip folder that contains files that generated an HTML for the Certificate of Currently.

To see how these files are compiled, open and review the Coc example.zip.

This file needs a short clear unique name as it is also used as the file record name and shown in the COC Template drop list.

A recommended convention is to use the Insurance supplier Supplier Code. E.g. 'ARMADA' becomes 'armada.zip'

Check for and create an import file record for the Certificate of Currency

  1. = 'Contract Templates'
  2. = 'Unique.zip' (the same name as the zip folder made above)

Import and test the zip file in the system

Visit the Upload a new certificate of currency template process page for the steps to do this import.

Check or set-up email templates

Unlike other events, the event email is not linked via , as more than one Certificate of Currency email and attachment can be configured in the system.

  1. For each Certificate of Currency you will use, populate the table as follows;

  2. = 'pdfcertificateofcurrencyhtml'

  3. = 'armada.zip'. This can be set up to use different template ZIP file used by different channels.

  4. = 'certificateofcurrency'

Legacy set-up for email templates

Email templates created before November 2020 were set-up differently.
You may have templates set-up like this. They work fine, but they can be updated to the current method easily. Contact your Account Manager to change them.
The primary benefit of updating is that managing the document template is easier.

  1. For each Certificate of Currency you will use, populate the table as follows;

  2. = 'pdfcertificateofcurrency@@@'

  3. = 'COC%'

  4. = 'certificateofcurrency'

Check or set-up email template recipients

Below is the recommended recipient record. Other recipients can be added if required.

  1. = 'to'
  2. = 'no'
  3. = 'driver_name'
  4. = 'driver_email'
  5. = 'active'

Link the Certificate of Currency email template to the Insurance supplier record

  1. Go to Administration / Suppliers
  2. Supplier Code - enter the required Insurance suppliers code and hit [Enter]
  3. Navigate to the Suppliers / Account tab
  4. COC Template - select the required template from the drop list

COC Template drop list

Below is an example of how a combination of current and legacy email templates will display in the drop list.

  1. Legacy email name = 'pdfcertificateofcurrencyarmada' and sub_name = COC

  2. Legacy email name = 'pdfcertificateofcurrencyvero' and sub_name is blank

  3. Email template = 'armada.zip'

How they show in the drop list
armada (COC)
vero
armada.zip

Set up Channel Certificate of Currency (COC) templates

You can set-up separate Certificate of Currency (COC) emails for different channels.
Visit the Channels Setup page for all channel set-up details.

Set-up steps

  1. Set up supplier and assign appropriate COC template to it.
  2. Set up Internal Insurer for these suppliers.
  3. Set up gbtemplates record for COC and link it to channels by populating channelid field.
  4. channelid** = channelid or 0
  5. = 'pdfcertificateofcurrencyhtml'
  6. = 'xxx.zip'. Make sure this matches with COC template assigned to the supplier (insurer) record used on Internal Insurer.
  7. = 'certificateofcurrency'
  8. Upload COC ZIP file specified in sub_name above.
    Once the above setup is complete you can
  9. Link a Client to Channel. Refer to Clients MLA page.
  10. Go to Contracts / Insurance and select Policy Owner → Insurer
  11. Go to Contracts / Events and create a COC event for the linked Insurer to email to the Driver.

Useful Queries

SELECT * FROM gb_file_types;SELECT * FROM gb_files;SELECT * FROM gb_templates AS tWHERE name like 'pdf_certificate_of_currency_armada%';SELECT t.template_id, t.sub_name, tr.*FROM gb_templates AS tINNER JOIN gb_template_recipients AS tr ON tr.template_id = t.template_idWHERE t.name like 'pdf_certificate_of_currency_armada%';SELECT t.template_id, t.sub_name, ta.*FROM gb_templates AS tINNER JOIN gb_template_attachments AS ta ON ta.template_id = t.template_idWHERE t.name like 'pdf_certificate_of_currency_armada%';SELECT template_id, name, sub_name, group_type,CASE WHEN name = 'pdf_certificate_of_currency_html' THEN sub_name ELSE CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(name, '_', -1), '_', 1),IF(sub_name="","",CONCAT("(",sub_name,")")) ) ENDAS 'COC_Template'FROM gb_templatesWHERE name LIKE 'pdf_certificate_of_currency_armada%'ORDER BY name;SELECT c.contract_id, CONCAT(d.given_name, ' ', d.surname) AS driver_name, si.name AS insurer_name, sf.name AS financier_nameFROM fm_contracts cINNER JOIN fm_drivers d ON d.driver_id = c.driver_idINNER JOIN fm_suppliers si ON si.supplier_id = c.supplier_id_insurerINNER JOIN fm_suppliers sf ON sf.supplier_id = c.supplier_idWHERE c.contract_id = 100000;

Placeholders

Download this request form COC Event Email Request and send it to Catch-e Support if you want to set-up a Contract Event Email.

Placeholders

The placeholders listed below are available for use in Contract Event Emails when a Certificate of Currency is being generated.

The markers ## or {} can be used to make placeholders. E.g. #contractid# or {contractid} are both fine.

PlaceholderDescription (Location of data in system screens)
Driver Details
given_nameDrivers/Contact "Given Name"
driver_nameDrivers/Contact "Salutation" "Given Name" "Surname"
driver_emailDrivers/Contact "Email"
driver_addressDrivers/Contact
driveraddress1Drivers/Contact
driveraddress2Drivers/Contact
driver_areaDrivers/Contact
driver_stateDrivers/Contact
driver_postcodeDrivers/Contact
Client Details
client_nameClients/Contact "Name"
Contract Details
contract_idContracts Header "Contract ID"
reg_noContracts/Contract "Reg Number"
contract_startContracts/Billing "Contract Start"
variant_descriptionContracts/Vehicle "Description"
variant_makeContracts/Vehicle "Manufacturer Name"
variant_modelContracts/Vehicle "Model Name"
variant_year
vinContracts/Vehicle "VIN"
vin:''Contracts/Vehicle "VIN"
Contract Events Email
event_idContracts/Events
event_date
eventdateraw
Finance Details
financiersuppliercodeSuppliers/Detail "Email"
financiersuppliernameSuppliers/Detail "Name"
Insurance Details
insurednamecoc
insurersuppliercodeContracts/Insurance "Insurer"
insurersuppliernameContracts/Insurance "Insurer"
insurancepolicynoContracts/Insurance "Policy Number
insurance_startContracts/Insurance "Start Date"
insurance_renewalContracts/Insurance "Policy Due Date"
periodofinsurance
insurance_typeContracts/Insurance "Insurance Category"
insurance_baseContracts/Insurance "Base Cost"
insurancefireservice_levyContracts/Insurance "Fire Service Levy"
insurancestampdutyContracts/Insurance "Stamp Duty"
insurancebrokerfee_monthlyContracts/Insurance "Broker Fee"
Other Details
sender_addressUsers/Details "Email" (for the user who is sending the email)
sender_nameUsers/Details "Name"
useridsenderUsers/Details "User ID"

Calculated Placeholders

PlaceholderDescription (Calculation details of the Placeholders)
insurancebrokerfee_gstROUND(((insurancebrokerfeemonthly*gstrate)/100),2)
insurancegstexcl_feesROUND((((insurancebase+insurancefireservicelevy)*gst_rate)/100),2)
insurancegrossexcl_feesROUND (insurancebase+insurancefireservicelevy+insurancestampduty +(((insurancebase+insurancefireservicelevy)*gst_rate)/100),2)
insurance_grossROUND(insurancebase+insurancefireservicelevy+insurancestampduty+insurancebrokerfeemonthly+(((insurancebase+insurancefireservicelevy+c.insurancebrokerfeemonthly*gst_rate)/100),2)
insyearlybaseinsurance_base * 12
insyearlyfireservicelevyinsurancefireservice_levy * 12
insyearlygstexclfeesROUND((((insurancebase + insurancefireservicelevy)*g.gst_rate)/100),2) * 12
insyearlystamp_dutyinsurancestampduty * 12
insyearlybroker_feeinsurancebrokerfee_monthly * 12
insyearlybrokerfeegstROUND(((insurancebrokerfeemonthly * gstrate)/100),2) * 12
insyearlygrossROUND(insurancebase + insurancefireservicelevy + insurancestampduty + insurancebrokerfeemonthly+(((insurancebase + insurancefireservicelevy + insurancebrokerfeemonthly)* gst_rate)/100),2) * 12
insyearlygrossexclfeesROUND(insurancebase + insurancefireservicelevy + insurancestampduty +(((insurancebase + insurancefireservicelevy) * gst_rate)/100),2) * 12

Troubleshooting

7 Reasons why your Certificate of Currency event email is not working

Alert messageProblem area
Supplier not set!The contract does not has an "Insurer" recorded on the Contracts / Insurance screen
COC Template not set for (supplier_code) nameThe "Insurer" does not have a valid "COC Template You need to link the Certificate of Currency email template to the Insurance supplier record
Report template missing for event type 'COC'! Please contact your system administratorThe template is missing or set to inactive for the insurer
Error adding mail, support has been notified!The contract does not have a linked driver
Mail not created!The contract does not have a linked financier
Mail not created!The contract is not linked to a variant. Go to Contracts / Vehicle and use the "Description" lookup window to open the Advanced Vehicle Search to select and save the variant.
Mail not created!The driver does not have an email address

Upload a new certificate of currency template

Qualifiers

  1. You have performed UAT on a new or updated Certificate of Currency email attachment
  2. Catch-e recommends uploading you own certificate of currency zip files for the following reasons;
  3. You can update your Live system as soon as UAT is complete
  4. The emails back and forth with Catch-e Support are reduced
  5. The zip files are not being emailed. This is more secure and some email systems will block zip files

In Staging

  1. Go to Setup / Import or Export Files
  2. Select the Export radio button
  3. File Type - select 'Contract Templates'
  4. File Name - select the required *.zip file
  5. Click on **
  6. Save the zip file down

In Live

  1. Go to Setup / Import or Export Files
  2. Select the Import radio button
  3. File Type - select 'Contract Templates'
  4. File Name - select the required *.zip file
  5. Drop or browse to attach the zip file saved from Staging
  6. Click on **
  7. Go to Contracts / Events and raise a Certificate of Currency email event
  8. Review the wording of the email and that the attachment can open correctly