docs

Home All functions Legacy functions Categories

vuSendMailWait()

Clarion prototype

Prototype: vuSendMailWait(*CSTRING InFrom, *CSTRING InTo, *CSTRING InCC, *CSTRING InBCC, *CSTRING InSubject, *CSTRING InBody, *CSTRING InAttach), SIGNED, PROC, PASCAL, RAW, NAME(‘vuSendMailWait’)

Purpose

Queues one message (same input contract as vuSendMail()) and blocks until queue processing finishes.

Parameters

| Parameter | Type | Description | |—|—|—| | InFrom | *CSTRING | Sender selector. You may pass a full mailbox, a plain email address, a display name only, or blank. See From selection rules below. | | InTo | *CSTRING | Recipient email address list. | | InCC | *CSTRING | CC address list. | | InBCC | *CSTRING | BCC address list. | | InSubject | *CSTRING | Message subject text. | | InBody | *CSTRING | Message body text. | | InAttach | *CSTRING | Optional attachment file path, comma/semicolon-separated attachment list, or wildcard mask. |

Return value / error codes

| Value | Meaning | |—|—| | 1 | Send completed successfully. | | 0 | Send did not complete successfully. | | -2 | Invalid From or To address format. | | -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
cFrom   CSTRING(256)
cTo     CSTRING(256)
cCC     CSTRING(256)
cBCC    CSTRING(256)
cSubj   CSTRING(256)
cBody   CSTRING(1024)
cAttach CSTRING(260)

cFrom = 'sender@example.com'
cTo = 'recipient@example.com'
cCC = ''
cBCC = ''
cSubj = 'Wait test'
cBody = 'Send and wait'
cAttach = ''

rc = vuSendMailWait(cFrom, cTo, cCC, cBCC, cSubj, cBody, cAttach)
MESSAGE('vuSendMailWait rc=' & rc)

Notes

HTML example (Clarion source literal)

cBody = '<<html><<body><<h2>vuMailKit HTML Test<</h2>' & |
        '<<p>This is a test email sent by vuMailKit.<</p>' & |
        '<<ul><<li>First item<</li>' & |
        '<<li><<strong>Second item should be bold<</strong><</li><</ul>' & |
        '<</body><</html>'
cAttach = ''

Inline image example, local file path (Clarion source literal)

cBody = '<<html><<body><<p>Inline image test<</p>' & |
        '<<p><<img src="C:\Temp\test.jpg"><</p>' & |
        '<</body><</html>'
cAttach = ''

Inline image example, remote web image (Clarion source literal)

cBody = '<<html><<body><<p>Remote inline image test<</p>' & |
        '<<p><<img src="https://www.example.com/images/test.jpg"><</p>' & |
        '<</body><</html>'
cAttach = ''

Legacy inline-attachment embed example

cBody = '_embed attachments width=300 height=150_'
cAttach = 'C:\Temp\test.jpg'

For more body-image patterns, including external HTML files with images and wildcard image insertion from the Attach parameter, see Send an embedded image.

From display name behavior

From selection rules

vuSendMailWait() resolves the effective sender using these rules:

This keeps legacy behavior intact while allowing per-message display-name overrides when a stored profile sender already exists.

Notes on OAuth/profile sends

Home All functions Legacy functions Categories