docs

Home All functions Legacy functions Categories

vuSendMailFromFile()

Clarion prototype

Prototype: vuSendMailFromFile(*CSTRING InCsvFileName, *CSTRING InDefaultAttachment), SIGNED, PROC, PASCAL, RAW, NAME(‘vuSendMailFromFile’)

Purpose

Reads a CSV file of messages, validates rows, and queues valid rows for SMTP delivery.

Parameters

| Parameter | Type | Description | |—|—|—| | InCsvFileName | *CSTRING | CSV file path to read. | | InDefaultAttachment | *CSTRING | Default attachment path/list applied when a CSV row has an empty ATTACH field. |

Return value / error codes

| Value | Meaning | |—|—| | 1 | At least one valid row was queued. | | 0 | File missing/invalid, no valid rows, or processing failure. | | -451 | vuMailKit detected conflicting .NET mail/runtime files in the application folder before the send operation. | | -9001 | vuMailKit licensing was not initialized. | | -9002 | license string is invalid or initialization failed. | | -9003 | current license tier does not allow this feature. |

Example (Clarion)

rc          LONG
csvFile     CSTRING(260)
defaultAtt  CSTRING(260)

csvFile = 'C:\Mail\outbox.csv'
defaultAtt = ''

rc = vuSendMailFromFile(csvFile, defaultAtt)
MESSAGE('vuSendMailFromFile rc=' & rc)

Notes

From column behavior

The CSV FROM column follows the same sender-selection rules as vuSendMail() and vuSendMailWait():

If a row supplies a display name only and there is no saved/default profile sender address available, that row is treated as invalid and is skipped.

Home All functions Legacy functions Categories