docs

Home All functions Legacy functions Categories

vuSendMail()

vuSendMail(*CSTRING InFrom,*CSTRING InTo,*CSTRING InCC,*CSTRING InBCC,*CSTRING InSubject,*CSTRING InBody,*CSTRING InAttach),SIGNED,PROC,PASCAL,RAW,NAME('vuSendMail')

Purpose

Validates and queues one outbound email record to the SMTP worker queue.

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 | Attachment file path. |

Return value / error codes

Example (Clarion)

MAP
  MODULE('vuMail.dll')
    vuSendMail(*CSTRING InFrom,*CSTRING InTo,*CSTRING InCC,*CSTRING InBCC,*CSTRING InSubject,*CSTRING InBody,*CSTRING InAttach),SIGNED,PROC,PASCAL,RAW,NAME('vuSendMail')
  END
END

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 = 'Queue test'
cBody = 'Hello from vuSendMail'
cAttach = ''

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

Notes

Home All functions Legacy functions Categories

From display name behavior

From selection rules

vuSendMail() now resolves the effective sender using these rules:

This lets legacy applications keep working while also allowing per-message display-name overrides without repeating the stored profile address every time.

Notes on OAuth/profile sends