> Markdown version of https://yucca.app/en/docs/guides/smtp/. Documentation index: [llms.txt](https://yucca.app/en/llms.txt), full text in one file: [llms-full.txt](https://yucca.app/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Receiving events by Email

> **Info.** Supported since version 0.6.0

Starting with version 0.6.0, *Yucca* can now receive events from cameras via email.

## How it works

Most modern IP cameras can detect motion in the frame and send an email notification about it. In our case [Yucca](https://yucca.app/) acts as an [SMTP](https://en.wikipedia.org/wiki/SMTP) server, listening on a dedicated port. When a stream is added, it's assigned a unique email address. Then, in the camera's settings, Yucca is specified as the SMTP server, and the unique assigned address is used as both the sender and destination address. When the camera detects motion in the frame, it sends a message about it to the server. The server, in turn, identifies which stream the notification belongs to and records the time it arrived.

[![how_work](/en/assets/images/how_work-77ef3820b94f2f0b7496ddc452faed1b.png)](https://yucca.app/en/assets/files/how_work-77ef3820b94f2f0b7496ddc452faed1b.png)

Based on this data, an event is created, which is then displayed on the timeline in the player's progress bar.

[![event_labels](/en/assets/images/event_labels-9a73b72d179a7920a8c57500e4ca0feb.png)](https://yucca.app/en/assets/files/event_labels-9a73b72d179a7920a8c57500e4ca0feb.png)

The duration of an event is determined by the [event_window_duration](https://yucca.app/en/docs/configuration.md#event_window_duration) parameter

## How to configure it

For this to work, you need to enable the [SMTP server](https://yucca.app/en/docs/configuration.md#smtp_server) in the settings; it's already enabled by default and listens on port 1025. To prevent unauthorized connections, set a [username](https://yucca.app/en/docs/configuration.md#username) and [password](https://yucca.app/en/docs/configuration.md#smtp-server-password); by default they're not set.

Next, in the settings of an already added camera you can see the details that will come in handy later when configuring the cameras themselves.

[![yucca_01](/en/assets/images/yucca_01-6407e14402af8dfb455d5cbe90acbbc3.png)](https://yucca.app/en/assets/files/yucca_01-6407e14402af8dfb455d5cbe90acbbc3.png) [![yucca_02](/en/assets/images/yucca_02-fa993c3b70b78c6f12a1f798e9fee25f.png)](https://yucca.app/en/assets/files/yucca_02-fa993c3b70b78c6f12a1f798e9fee25f.png)

The *Server* field can be overridden using the [domain](https://yucca.app/en/docs/configuration.md#domain) flag. By default, the first IP address on the interface with the default route is shown.
