Skip to content

Instantly share code, notes, and snippets.

@damithsj
Created February 28, 2023 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damithsj/a6feb5e07068c4c92df4e098b9fe20b2 to your computer and use it in GitHub Desktop.
Save damithsj/a6feb5e07068c4c92df4e098b9fe20b2 to your computer and use it in GitHub Desktop.
Send IFS Mail with a CLOB attachment
declare
attachments_ COMMAND_SYS.ATTACHMENT_ARR;
attachment_ CLOB;
begin
-- Create CSV as a CLOB
attachment_ := 'ADD YOUR CSV CONTENT HERE';
--Add the CSV as an attachment
COMMAND_SYS.Add_Attachment(attachments_ => attachments_,
filename_ => 'your_filename.csv',
attachment_ => attachment_);
-- Mail
COMMAND_SYS.Mail(sender_ => 'IFSAPP',
from_ => 'FROM_USER',
to_list_ => 'test@test.com',
subject_ => 'MAIL SUBJECT',
text_ => 'MAIL BODY',
attachments_ => attachments_);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment