email_compose->addAttachment
Adds an email attachment.
Target
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
-databy keyword, keeping the leading hyphen in the call. -name- Optional value. Supply
-nameby keyword, keeping the leading hyphen in the call. -path- Optional value. Supply
-pathby keyword, keeping the leading hyphen in the call. -type- Optional value. Supply
-typeby 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.