diff --git a/GlideSysAttachment/addAttachment.js b/GlideSysAttachment/addAttachment.js new file mode 100644 index 0000000..a18122b --- /dev/null +++ b/GlideSysAttachment/addAttachment.js @@ -0,0 +1,4 @@ +var attachment = new GlideSysAttachment(); +//The syntax for write api is - , , , +var attachmentSysId = attachment.write(current, 'file_name.txt', 'text/plain', 'file contents'); +gs.info("Attachment Sys ID: " + attachmentSysId); diff --git a/OutboundEmail Action/sendOutboundEmail.js b/OutboundEmail Action/sendOutboundEmail.js new file mode 100644 index 0000000..f49cd3a --- /dev/null +++ b/OutboundEmail Action/sendOutboundEmail.js @@ -0,0 +1,8 @@ +var mail = new GlideEmailOutbound(); +mail.setReplyTo('testing@example.com'); +mail.setFrom('developer@example.com'); +mail.setSubject('ServiceNow Testing'); //setting the subject +mail.addAddress('cc', 'admin@example.com','John Snow'); //specify the address and name +mail.setBody('Hello world!');//sets the email body contents +//mail.addRecipient('hacktoberfest@example.com');//Undocumented in ServiceNow docs but works in global scope. +mail.save();//Triggeres the outbound notification