# salt.returners.smtp_return

Return salt data via email

The following fields can be set in the minion conf file:

> smtp.from (required) smtp.to (required) smtp.host (required) smtp.port (optional, defaults to 25) smtp.username (optional) smtp.password (optional) smtp.tls (optional, defaults to False) smtp.subject (optional, but helpful) smtp.fields (optional)

There are a few things to keep in mind:

- If a username is used, a password is also required.

- You should at least declare a subject, but you don't have to.

- smtp.fields lets you include the value(s) of various fields in the subject line of the email. These are comma-delimited. For instance:

  > smtp.fields: id,fun

  ...will display the id of the minion and the name of the function in the subject line. You may also use 'jid' (the job id), but it is generally recommended not to use 'return', which contains the entire return data structure (which can be very large).

`salt.returners.smtp_return.` `returner`(ret)

  Send an email with the data

Current Salt release: 0.17.1

#### Previous topic

salt.returners.sentry_return

#### Next topic

salt.returners.sqlite3

### Quick search

Enter search terms or a module, class or function name.

### Upcoming SaltStack Events

My conferences on Lanyrd