# SENDEMAIL

#### Syntax

**SENDEMAIL**(*to*; *replyTo*; *subject*; *body*; *attachment;attachmentFileName*)

* *to* - address of the recipient - ***Value type**: text*
* *replyTo* - the reply-to address - ***Value type**: text*
* *subject* - the subject line of the email - ***Value type**: text*
* *body* - the body of the email - ***Value type**: text*
* *attachment -* the internal name of the file which should be attached to the email - ***Value type**: text (optional, default: empty - no file is attached)*
* *attachmentFileName -* the assigned name of the attached file - ***Value type**: text (optional, default: attachment, i.e. the internal file name is used as name of the attachment)*

#### Remarks

* The parameter *to* can be a column range containing a list of recipients.
* The parameter *attachment* must be the name of a file which has been generated on the nedyx server, including its extension (e.g. .pdf, .zip, ....
* The parameter *attachment* can be a column range containing a list of internal names of the files, which should be attached to the email.
* The parameter *attachmentFileName* can be a column range containing a list of names, which should be used for the according *attachment*.

#### Examples

*Example 1* - SENDEMAIL without an attachment

<figure><img src="/files/4LlCtRSUJn3vhfZQOPYX" alt=""><figcaption></figcaption></figure>

*Example 2* - SENDEMAIL with one attachment

In the next example, clicking the **Send Email** button below creates a pdf file containing the page "SalesDashboard".

Afterwards, the generated PDF file is sent as an email attachment by calling the SENDEMAIL function.

<figure><img src="/files/gQwKQ3px15soTmjwpcMf" alt=""><figcaption></figcaption></figure>

*Example 3* - As in example 2, but with four attachments to which suitable file names are assigned.

<figure><img src="/files/onSkhuXj3OrhbAkUK6XX" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/import-export-functions/sendemail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
