Print

ePUAP_SendStandardMessage()

ePUAP_SendStandardMessage() function sends a standard message to the address of the selected ePUAP user. Standard message means that the message is sent directly to the receiver and the sender may receive regular confirmation (UPP).

Syntax

ePUAP_SendStandardMessage(userName, receiverAddress, responseAddress, attachment);
ePUAP_SendStandardMessage(userName, receiverAddress, responseAddress, attachment, options);

Function arguments

  • userName – (String) a user name (login) of the ePUAP user (owner of the mailbox on behalf of whom the message is sent);
  • receiverAddress – (String) an address of the receiver’s ePUAP mailbox where the message will be sent to;
  • responseAddress – (String) an address of the ePUAP mailbox where the reciever can reply to for the message;
  • attachment – (File) a content of the message to be sent. The content should contain a specially prepared XML file compatible with one of the templates approved by ePUAP. The file can be selected by passing a content of a document-type field directly, a field name, a name or an ID of the attachment as well.

Return value

This function returns Object.
ePUAP_SendStandardMessage() function returns a JSON object with the following properties:

  • ’Status’ (only allowed values are 'OK’ and 'Error’),
  • ’Description’ (an error description),
  • ’MessageId’ (an id of the message generated by ePUAP),
  • ’ConfirmationId’ (an id of UPP confirmation),
  • ’ConfirmationFilename’ (a name of UPP confirmation file if available),
  • ’ConfirmationContent’ (a base64 content of UPP confirmation if available),
  • ’StatusCode’ (a status code of the sending procedure),
  • ’StatusDesc’ (a status description of the sending procedure).

Examples

Example 1:
It will send a new message with content from the field 'DocumentWithMessage’ to the address '/jankowalski/default’ on behalf of a user named 'amoditoffice’. The receiver of the message will get '/amoditoffice/mainMailbox’ as a reply-to (response) address.

res = ePUAP_SendStandardMessage("amoditoffice", "/jankowalski/default", "/amoditoffice/mainMailbox", [DocumentWithMessage]);
Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?