I can’t figure out how to add an file as attachment when sending a mail.
I have tried with: t2 setProperty: #Attachments value: 'C:tempfile.txt'.
And the property seems correct as it wont throw an error. But no file is attached. I suspect it is because i try to send a string…
This is what I have and it works.
(t2 := (COMDispatchDriver createObject: 'Outlook.Application') invokeMethod: #CreateItem withArguments: #(0)) setProperty: #To value: '[email protected]'.
t2 setProperty: #CC value: ''.
t2 setProperty: #Subject value: 'Test'.
t2 setProperty: #Body value: 'Here comes the file'.
t2 invokeMethod: #Send withArguments: #().
session release.
Any one who can explain to me how to add an attachment?