email_compose->addAttachment

Adds an email attachment.

Target member

Signature

1email_compose->addAttachment(-data= ?, -name= ?, -path= ?, -type= ?)

Adds an email attachment.

email_compose->addAttachment is called with member syntax on a receiver value. email_compose->addAttachment performs network or protocol work. Make timeouts, encodings, and authentication settings visible in calling code so failures are easier to diagnose.

Parameters

-data
Optional value. Supply -data by keyword, keeping the leading hyphen in the call.
-name
Optional value. Supply -name by keyword, keeping the leading hyphen in the call.
-path
Optional value. Supply -path by keyword, keeping the leading hyphen in the call.
-type
Optional value. Supply -type by keyword, keeping the leading hyphen in the call.

Examples

Basic call

1email_compose->addAttachment(-path='/tmp/report.pdf')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.