# Email (Outgoing - SMTP)
Zuar Runner allows you to create jobs that send an email with HTML/text body and
with attachment(s) via an external SMTP server. This is often useful to
distribute the data from a Zuar Runner job to various stakeholders.
This job type is available in Mitto 2.7+.
## Setup:
The following information is needed to create an SMTP job in Zuar Runner.
- Email account
- Username and password for Email server authentication
- Email provider: Outlook, Gmail, etc.
.. NOTE::
Gmail requires additional configuration.
Please `read more here `__ .
## Adding your email credentials
In your Zuar Runner in the menu on the left select "Credentials". On the Credentials
page select "Add Credentials".
Fill out the wizard with a credential name and your email and password as
below, setting the Type to `Basic.`
.. image:: assets/email-smtp__credential.png
:alt: Email Credential
You will refer to the "Credential Name" in the next step, which creates the
Zuar Runner job.
## Create an Email Job
Use the [Generic plugin](docs/generic/) to create a custom IO job.
Set the **type** to `email`.
Use the Zuar Runner job configuration below as a template, adjusting as needed:
```json
{
attachments: [
/var/data/new_test.csv
/var/data/another_test.xslx
]
credentials: my.email@mysite.com email
html:
This is a test email...
mail_bcc: [
]
mail_cc: [
]
mail_from: my.email@mysite.com
mail_subject: Subject of the Email
mail_to: [
someone@hostname.com
frank@email.com
]
port: 587
require_tls: true
server: smtp.office365.com
text: This is a test email...
}
```
- **attachments:** you can attach multiple files here. Use a full file path
for each file name, starting with the Zuar Runner data directory:
`/var/data/`
- **credentials:** This is the "Credential Name" from the previous step.
- **mail_from:** your email address.
- **mail_to:** you can include multiple recipients.
- **mail_subject:** the email subject line.
- **server:** the smtp server you're using. For example, `smtp.office365.com`
for Outlook.
- **port:** the TCP port that the mail server accepts connections on.
- **require_tls:** either `true` or `false` depending on the mail server
security policy.
- **text:** the plain text of the email body.
- **html:** the HTML of the email body, if to be used.
Click "Done" to save the job.
## Send an Email
To send an email click the "Start" button at the top of the job page.
.. NOTE::
Mail servers and mail sending is frequently secured according to the
organization IT policy. These policies and the Zuar Runner job parameters may
need to be adjusted to successfully route emails. If Emails from Zuar Runner fail
to be delivered, a user should consult with their IT Team, Email or
firewall administrators for guidance in addition to Zuar Support.