> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/as3/sendmessage.md).

# SendMessage

Task to send messages with AS3 protocol

Task version: 1.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.As3/tree/main/Frends.As3.SendMessage>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                       | Description                                                                                                                                  |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| SenderAs3Id : `String`     | <p>Id of the company that will send the message.</p><p><br>Default: <code>-</code><br>Example: <code>MyCompany</code></p>                    |
| ReceiverAs3Id : `String`   | <p>Id of the company that will receive the message.</p><p><br>Default: <code>-</code><br>Example: <code>YourCompany</code></p>               |
| Subject : `String`         | <p>Subject of the AS3 message.</p><p><br>Default: <code>-</code><br>Example: <code>Subject of the message</code></p>                         |
| MessageFilePath : `String` | <p>Path to the file that will be sent in the message.</p><p><br>Default: <code>-</code><br>Example: <code>C:\Document\message.txt</code></p> |
| {% endtab %}               |                                                                                                                                              |

{% tab title="Connection" %}

| Name                                   | Description                                                                                                                                                                                                                                                       |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FtpHost : `String`                     | <p>FTP server host name or IP address for the AS3 connection.</p><p><br>Default: <code>-</code><br>Example: <code>ftp.example.com</code></p>                                                                                                                      |
| FtpPort : `Int32`                      | <p>FTP server port.</p><p><br>Default: <code>21</code><br>Example: <code>21</code></p>                                                                                                                                                                            |
| FtpUser : `String`                     | <p>Username for FTP authentication.</p><p><br>Default: <code>-</code><br>Example: <code>myFtpUser</code></p>                                                                                                                                                      |
| 🗝FtpPassword : `String`               | <p>Password for FTP authentication.</p><p><br>Default: <code>-</code><br>Example: <code>myFtpPassword123</code></p>                                                                                                                                               |
| UsePassiveFtp : `Boolean`              | <p>Defines whether to use Passive mode for the FTP data connection.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                        |
| RemoteFilePath : `String`              | <p>Target directory path on the remote FTP server where the message will be uploaded.</p><p>The connection will change the working directory to this path before sending the file.</p><p><br>Default: <code>-</code><br>Example: <code>/inbox/messages</code></p> |
| SignMessage : `Boolean`                | <p>Defines whether to sign the message.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                   |
| EncryptMessage : `Boolean`             | <p>Defines whether to encrypt the message.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                |
| 🗝SenderCertificatePassword : `String` | <p>Password for the sender certificate.</p><p><br>Default: <code>-</code><br>Example: <code>mySecurePassword123</code></p>                                                                                                                                        |
| SenderCertificatePath : `String`       | <p>Path to the sender certificate file in .pfx format.</p><p><br>Default: <code>-</code><br>Example: <code>C:\Document\sender\_cert.pfx</code></p>                                                                                                                |
| ReceiverCertificatePath : `String`     | <p>Path to the receiver certificate file in .pfx format.</p><p><br>Default: <code>-</code><br>Example: <code>C:\Document\receiver\_cert.pfx</code></p>                                                                                                            |
| MdnReceiver : `String`                 | <p>Email where to send the MDN (Message Disposition Notification).</p><p><br>Default: <code>-</code><br>Example: <code><user@example.com></code></p>                                                                                                              |
| ContentTypeHeader : `String`           | <p>Specify content type header for the message if it's neither encrypted nor signed.</p><p><br>Default: <code>text/plain</code><br>Example: <code>application/zip</code></p>                                                                                      |
| {% endtab %}                           |                                                                                                                                                                                                                                                                   |

{% tab title="Options" %}

| Name                             | Description                                                                                                                                                                                                                                                        |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| LogDirectory : `String`          | <p>Directory path where AS3 communication logs will be stored. Leave empty to disable logging.</p><p>The caller is responsible for log rotation and cleanup of files in this directory.</p><p><br>Default: <code>-</code><br>Example: <code>C:\Logs\AS3</code></p> |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>                                                                                                                                                   |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                                                                                                                                     |
| {% endtab %}                     |                                                                                                                                                                                                                                                                    |
| {% endtabs %}                    |                                                                                                                                                                                                                                                                    |

## Task Result

| Name                               | Description                                                                                                                                                                                                                                                                                |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Success : `Boolean`                | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                                                                                                                                                                                         |
| PartnerResponse : `String`         | <p>Information about the FTP transport result or remote server response.<br>Example: <code>File 'message.txt' successfully uploaded to FTP directory '/inbox'.</code></p>                                                                                                                  |
| MessageId : `String`               | <p>Generated Message-ID of the sent AS3 message.<br>Example: <a href="mailto:123456789@ftp.example.com"><code><123456789@ftp.example.com></code></a></p>                                                                                                                                   |
| OriginalContentMIC : `String`      | <p>The locally computed digital Message Integrity Check (MIC) code of the sent file (e.g., Base64-encoded hash and algorithm name).<br>Example: <code>7v7F+fQbH4lD8bKGJTbXzWWcUlI=, sha256</code></p>                                                                                      |
| MdnOptions : `String`              | <p>The MIME options string that describes the MDN signature algorithm requested from the trading partner (e.g., signed-receipt-protocol and signed-receipt-micalg).<br>Example: <code>signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha256</code></p> |
| Error : `Error`                    | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p>                                                                                                                                                             |
| Error.Message : `String`           | <p>Summary of the error.<br>Example: <code>Unable to send message.</code></p>                                                                                                                                                                                                              |
| Error.AdditionalInfo : `Exception` | <p>Additional information about the error.<br>Example: <code>object { Exception AdditionalInfo }</code></p>                                                                                                                                                                                |

## Task Changelog

Changelog for Task Frends.As3.SendMessage.

### \[1.0.0] - 2026-08-04

#### Added

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/tasks/tasks/as3/sendmessage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
