UNPKG

@itentialopensource/adapter-email

Version:

Email notification adapter

418 lines (417 loc) 16.3 kB
{ "id": "@itentialopensource/adapter-email", "encrypted": false, "type": "Adapter", "title": "EmailOpensource", "export": "EmailOpensource", "brokers": ["notification"], "src": "adapter.js", "topics": { "email-event-unseen": { "required": [], "type": "object", "properties": { }, "additionalProperties": true } }, "methods": [ { "name": "mailWithOptions", "summary": "Send email with cc, bcc, and attachment options", "description": "Email a message with cc, bcc, and attachment options.", "input": [ { "name": "from", "type": "string", "required": true, "description": "Email address of the sender.", "info": "Email address of the sender", "schema": { "title": "from", "type": "string", "examples": [ "example@itential.com" ], "minLength": 1 } }, { "name": "to", "type": "array", "required": true, "description": "List of email addresses (recipients).", "info": "List of email addresses (recipients)", "schema": { "title": "to", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com", "secondRecipient@itential.com" ] ] } }, { "name": "subject", "type": "string", "required": true, "description": "Subject of email.", "info": "Subject of email", "schema": { "title": "subject", "type": "string", "examples": [ "Successful Device Deployment" ] } }, { "name": "body", "type": "string", "required": true, "description": "Body of email.", "info": "Body of email", "schema": { "title": "body", "type": "string", "examples": [ "Your device successfully deployed with the following details..." ] } }, { "name": "displayName", "type": "string", "required": false, "description": "The display name of the sender; default value is 'Itential Platform'.", "info": "The display name of the sender; default value is 'Itential Platform'", "schema": { "title": "displayName", "type": "string", "examples": [ "Itential Platform" ] } }, { "name": "cc", "type": "array", "required": false, "description": "List of email addresses (recipients) for the Cc: field.", "info": "List of email addresses (recipients) for the Cc: field", "schema": { "title": "cc", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com" ] ] } }, { "name": "bcc", "type": "array", "required": false, "description": "List of email addresses (recipients) for the Bcc: field.", "info": "List of email addresses (recipients) for the Bcc: field", "schema": { "title": "bcc", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com" ] ] } }, { "name": "attachments", "type": "array", "required": false, "description": "List of attachments.", "info": "List of attachments", "schema": { "title": "attachments", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the attachment file.", "examples": [ "Attachment.txt" ] }, "content": { "type": "string", "description": "The contents of the attachment file.", "examples": [ "Text inside of attached file..." ] } } } } } ], "output": { "type": "object", "name": "response", "description": "Response from email notify.", "info": "Response from email notify", "schema": { "title": "response", "type": "object", "properties": { "accepted": { "type": "array", "items": { "type": "string", "examples": [ "example@itential.com" ] } }, "rejected": { "type": "array", "items": { "type": "string", "examples": [ "example@itential.com" ] } } } } }, "task": true, "roles": [ "admin" ] }, { "name": "mailWithAdvancedFields", "summary": "Send email with advanced fields and custom headers", "description": "Email a message with cc, bcc, attachment options, advanced fields and additional headers", "input": [ { "name": "from", "type": "string", "required": true, "description": "Email address of the sender.", "info": "Email address of the sender", "schema": { "title": "from", "type": "string", "examples": [ "example@itential.com" ], "minLength": 1 } }, { "name": "to", "type": "array", "required": true, "description": "List of email addresses (recipients).", "info": "List of email addresses (recipients)", "schema": { "title": "to", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com", "secondRecipient@itential.com" ] ] } }, { "name": "subject", "type": "string", "required": true, "description": "Subject of email.", "info": "Subject of email", "schema": { "title": "subject", "type": "string", "examples": [ "Successful Device Deployment" ] } }, { "name": "body", "type": "string", "required": true, "description": "Body of email.", "info": "Body of email", "schema": { "title": "body", "type": "string", "examples": [ "Your device successfully deployed with the following details..." ] } }, { "name": "displayName", "type": "string", "required": false, "description": "The display name of the sender; default value is 'Itential Platform'.", "info": "The display name of the sender; default value is 'Itential Platform'", "schema": { "title": "displayName", "type": "string", "examples": [ "Itential Platform" ] } }, { "name": "cc", "type": "array", "required": false, "description": "List of email addresses (recipients) for the Cc: field.", "info": "List of email addresses (recipients) for the Cc: field", "schema": { "title": "cc", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com" ] ] } }, { "name": "bcc", "type": "array", "required": false, "description": "List of email addresses (recipients) for the Bcc: field.", "info": "List of email addresses (recipients) for the Bcc: field", "schema": { "title": "bcc", "type": "array", "items": { "type": "string" }, "examples": [ [ "example@itential.com" ] ] } }, { "name": "attachments", "type": "array", "required": false, "description": "List of attachments.", "info": "List of attachments", "schema": { "title": "attachments", "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the attachment file.", "examples": [ "Attachment.txt" ] }, "content": { "type": "string", "description": "The contents of the attachment file.", "examples": [ "Text inside of attached file..." ] } } } } }, { "name": "additionalFields", "type": "object", "required": false, "description": "An object of additional advanced fields. The format will be {\"priority\": \"high\", \"date\": \"date value\",...}", "info": "An object of email advanced fields.", "schema": { "title": "additionalFields", "type": "object" } }, { "name": "headers", "type": "object", "required": false, "description": "An object of additional header fields. The format will be {\"X-MSMail-Priority\": \"High\", \"Importance\": \"High\",...}", "info": "An object of additional header fields", "schema": { "title": "headers", "type": "object" } } ], "output": { "type": "object", "name": "response", "description": "Response from email notify.", "info": "Response from email notify", "schema": { "title": "response", "type": "object", "properties": { "accepted": { "type": "array", "items": { "type": "string", "examples": [ "example@itential.com" ] } }, "rejected": { "type": "array", "items": { "type": "string", "examples": [ "example@itential.com" ] } } } } }, "task": true, "roles": [ "admin" ] } ], "roles": [ "admin" ], "views": [] }