Emailing Closeout Files to Recipients
Sending the closeout file via email to specified addresses
Fleetwatch FMS · Closeout Files
Emailing the Daily Closeout File to Recipients
The CloseOutSettings table in the Fleetwatch database controls who receives the daily closeout file by email. You can send it to one or more recipients.
Once-daily delivery only
This email method is intended for once-daily file transmissions. It is not recommended for real-time closeout processing.
How the Settings Work
CloseoutIndex tells Fleetwatch which closeout file the row applies to:
| CloseoutIndex | CloseoutType | Closeout file |
|---|---|---|
| 0 | PCO | Primary Closeout |
| 1 | SCO | Secondary Closeout |
Each closeout uses two kinds of rows, set by ParameterName:
| ParameterName | ParameterValue | What it does |
|---|---|---|
| Email to Target | True or False | The on/off switch for emailing that closeout. True = enabled, False = disabled. One row per closeout. |
| Email Target List | One email address | A recipient for that closeout. Add one row per recipient. |
One recipient per Email Target List row
Each recipient needs a separate Email Target List row with their own email address as the ParameterValue. Don’t combine multiple recipients in one row.
| ✔ Correct | Row 1: fuel.manager@example.com Row 2: maintenance@example.com |
| ✘ Wrong | Row 1: fuel.manager@example.com; maintenance@example.com |
Example
In this example, emailing is enabled for the PCO, disabled for the SCO, and several recipients are set up to receive the PCO.
| Row | What it means |
|---|---|
| 0 · PCO · Email to Target · True | Primary Closeout email is on |
| 0 · PCO · Email Target List · (address) | Each of these rows is one PCO recipient |
| 1 · SCO · Email To Target · False | Secondary Closeout email is off |
| 1 · SCO · Email Target List · (address) | An SCO recipient. It stays in the table but receives nothing while the SCO is set to False. |
Common Changes (SQL)
These queries change the Fleetwatch database directly. Run them only if you’re comfortable in SQL Server Management Studio, back up the table first, and check with Fleetwatch Support if you’re unsure. Replace the example email addresses with real ones.
View the current settings
SELECT * FROM dbo.CloseOutSettings
ORDER BY CloseoutIndex, ParameterName;
Add a PCO recipient
INSERT INTO dbo.CloseOutSettings
(CustomerID, CloseoutIndex, CloseoutType, ParameterName, ParameterValue)
VALUES
('0000000000', 0, 'PCO', 'Email Target List', 'new.person@example.com');
Use the same CustomerID as the existing rows. RecordIndex fills in automatically. For an SCO recipient, use 1, 'SCO'.
Turn email on or off for a closeout
UPDATE dbo.CloseOutSettings
SET ParameterValue = 'True' -- or 'False'
WHERE CloseoutIndex = 0 -- 0 = PCO, 1 = SCO
AND ParameterName = 'Email to Target';
Remove a recipient
DELETE FROM dbo.CloseOutSettings
WHERE ParameterName = 'Email Target List'
AND ParameterValue = 'old.person@example.com';
Good to know
• Turning a closeout’s Email to Target to False stops all of its emails but keeps the recipient list, so it’s easy to turn back on.
• Double-check each email address for typos. A misspelled address won’t receive the file.
• If a recipient isn’t getting the file, ask them to check their spam or junk folder before changing settings.
Need help setting up closeout email recipients? Contact Fleetwatch Support.