Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions GlideSysAttachment/addAttachment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var attachment = new GlideSysAttachment();
//The syntax for write api is - <GlideRecord record>, <String fileName>, <String contentType>, <String content>
var attachmentSysId = attachment.write(current, 'file_name.txt', 'text/plain', 'file contents');
gs.info("Attachment Sys ID: " + attachmentSysId);
8 changes: 8 additions & 0 deletions OutboundEmail Action/sendOutboundEmail.js
Original file line number Diff line number Diff line change
@@ -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
Loading