Jon Ander (IGN)
Participante
Jon Ander (IGN)

Buenas,

Espero que te sirva:

trigger OnAction()
var
cuMail: Codeunit “Email Message”;
recipients: List of [text];
ins: InStream;
fileName: text;
cuSMTP: Codeunit “SMTP Mail”;
begin
UploadIntoStream(‘Select file’, ”, ‘All Files (*.*)|*.*’, filename, ins);
recipients.Add(‘xxxxx@xxxxxx.es’);
cuSMTP.CreateMessage(‘Jon ander’, ‘xxxxx@xxxxxx.es’, recipients, ‘test’, ‘test’, true);
cuSMTP.AddAttachmentStream(ins, ‘File.txt’);
if not cuSMTP.Send() then Error(GetLastErrorText);
end;

#1018478