Table of Contents |
---|
Introduction
The platform incorporates mechanisms for sending emails, accessible from different parts of it.:
API RESTMail Service REST API
TheĀ API MailService is available as an API from the Control Panel:
In the different methods, several parameters are requested. In all cases in which it is a message to Support, the subject of the message will be "Support Request" and the recipient will be the platform support's e-mail address. In the other methods, these two parameters must be entered.
In the case of "Multiple" methods, it allows you to do the same as those that are not "Multiple", except that you cannot send mail to several recipients.
For example, for the send method, to send a simple mail.:
In the Support version of this method (sendSupport), only the message body will be requested.
In the case of HTML, it will request the same as the previous one, with the text in HTML format, and, in addition, the name of the attached file to be sent and the file, encoded in Base64 format. Same as the previous one, it has its version for support (sendHtmlSupport).
If you want to send a file with non-HTML text, there is the sendMailWithFile method, which requests the name of the file, the file in Base64, the subject, the recipient and the body of the message.
E-mails can be sent to users who have made a Support Request, from the id of that request, using the sendSupportRequest method:
FlowEngine Node
Using the FlowEngine and the "onesaitplatform-mail" node, you can send e-mails using the Mail services of the platform. Its configuration is as follows:
- Name: Node name.
- To: Recipient of the mail. If you want to send the mail to several recipients, these must be entered separated by semicolons (;).
- Subject: Mail subject.
- Body: Text to send (can be plain text or HTML).
- HTML: If this option is checked, the body content is interpreted as an HTML document.
- Filename: Name that receives the file attached to the mail, if any. It is mandatory that for the name contains to contain the extension of it. If left blank, no attachment will be sent. If completed, it must be entered into the node as a binary buffer in the msg.payload.filedata field.
These fields can be assigned externally within the msg.payload field, coming from the previous node.
An example for sending reports is in: /wiki/spaces/PT/pages/189694012.