# Send Email

Send an email using the SMTP protocol.

**Important: requires the use of a special password designed for interaction with external applications. To set it up, go to your email settings, section "Security" → "App passwords". Enable the "Use app passwords" option and select "IMAP, POP3, SMTP Mail". Then specify the required secure connection and enter a unique password — it will no longer be displayed and will ensure secure interaction with external services.**

**Example for Yandex Mail:**

1. Go to "Settings" → "All settings" → "Security":

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-2047bbac16d82b38b6dab11163b31cdc43cdb38a%2Fimage%20(241).png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click on the "app passwords" link, enable "Use app passwords":

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-b83ca6037c156ea6c2a9b512aeda37e57f1386f9%2Fimage%20(242).png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click the "+" icon to the right of the "IMAP, POP3, SMTP Mail" line:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-ce9f7f64e38f4c328cc621d81a05a2a555068ee2%2Fimage%20(243).png?alt=media" alt=""><figcaption></figcaption></figure>

4. Enter the password name:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-e45d5649c4cabc801799cb7f7d208963a9bc337f%2Fimage%20(244).png?alt=media" alt=""><figcaption></figcaption></figure>

5. Copy and save the password for external services:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-d6b8e311a0302cc57df41a7a7ea93090fe3edcd2%2Fimage%20(245).png?alt=media" alt=""><figcaption></figcaption></figure>

**Example for Mail:**

1. Go to the "Password and security" section:

   <div align="center"><figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-bb001b71cb6e3a65c213751364758de885bf6a4d%2Fimage%20(232).png?alt=media" alt=""><figcaption></figcaption></figure></div>
2. Select the "External services" subsection:

   <figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-51940b6a20a51077b1f581d6da57dda2cdd7844f%2Fimage%20(233).png?alt=media" alt=""><figcaption></figcaption></figure>
3. Enable "Access to Mail via IMAP, POP, and SMTP":

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-ad2730de6d18cf46524c0b050778c5b069bcde6c%2Fimage%20(234).png?alt=media" alt=""><figcaption></figcaption></figure>

4. Click the "< Back" button and go to the "Passwords for external applications" subsection:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-81c8279bf529c9823584c5113388341af0b6a6de%2Fimage%20(236).png?alt=media" alt=""><figcaption></figcaption></figure>

5. Click the "Create" button:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-916604e20231d52d7f3da88a202aebc6eed28dc3%2Fimage%20(237).png?alt=media" alt=""><figcaption></figcaption></figure>

6. Enter the password name:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-0c722d05bc21f058d49f453c1aea869e085808a0%2Fimage%20(238).png?alt=media" alt=""><figcaption></figcaption></figure>

7. Select the protocol type and click the "Continue" button:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-bdbd019f82b60c9cef0c64af4d5bf36e1f9d863c%2Fimage%20(240).png?alt=media" alt=""><figcaption></figcaption></figure>

8. Enter the password for external services, save it, and click the "Confirm" button:

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-62fc197a16cf582665baa542c5eaf8d97b844fee%2F2025-10-23_16-41-04.png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="287" valign="top"></th><th width="361.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top">Server</td><td valign="top">[Text] Server (e.g., <code>"smtp.mail.ru"</code>).</td></tr><tr><td valign="top">Port</td><td valign="top"><p>[Number] Port. If not specified, the default port is accepted:</p><ul><li>regular connection - 25,</li><li>secure connection - 587.</li></ul></td></tr><tr><td valign="top">Login</td><td valign="top">[Text] Login required for server authorization.</td></tr><tr><td valign="top">Password</td><td valign="top">[Text/SecureString] Password required for server authorization.</td></tr><tr><td valign="top">SSL</td><td valign="top">Indicates whether to use a secure connection.</td></tr><tr><td valign="top">Sender's Email</td><td valign="top">[Text] The email from which the message will be sent.</td></tr><tr><td valign="top">Sender's Name</td><td valign="top">[Text] The name of the sender from whom the message will be sent.</td></tr><tr><td valign="top">Recipient's Email</td><td valign="top">[Text] The email address of the recipient to whom the message needs to be sent. To specify multiple recipients, separate them with a semicolon.</td></tr><tr><td valign="top">Email Subject</td><td valign="top">[Text] The subject of the email.</td></tr><tr><td valign="top">Email Body</td><td valign="top">[Text] The content of the email.</td></tr><tr><td valign="top">HTML Markup</td><td valign="top">If checked, the email content will be sent as an HTML page and may contain tags.</td></tr><tr><td valign="top">Attachments</td><td valign="top">[Text/List/Dictionary] Path to the file / List of file paths / Dictionary with files to be attached to the email (key - name, value - path to the file).</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] Timeout for server response. The value is specified in seconds.</td></tr><tr><td valign="top">CC</td><td valign="top">[Text] Email address of the recipient to receive a copy of the email. To specify multiple recipients, separate them with a semicolon.</td></tr><tr><td valign="top">BCC</td><td valign="top">[Text] Email address of the recipient to receive a blind copy of the email. To specify multiple recipients, separate them with a semicolon.</td></tr><tr><td valign="top">Sent Email</td><td valign="top">[Object] The sent email. Can be used in the "Save to Sent" block.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Message</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>


---

# 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.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/elektronnaya-pochta-mail/otpravit-pismo-sendmailmessage.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.
