Mitto allows you to create jobs that send an email with HTML/text body and with attachment(s) via an SMTP server.

This job type is available in Mitto 2.7+.

Setup:

The following information is needed to create an SMTP job in Mitto.

  • Email account
  • Password
  • Email provider: Outlook, Gmail, etc.

Adding your email credentials

In your Mitto 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 like this:

credential wizard

You will use the "Credential Name" in the next step.

Creating the Job

1. Click on + Add in bottom left screen.

2. Create a generic job. and edit the following json to suit your needs:

{
    "attachments": [
        "/var/mitto/data/new_test.csv",
        "/var/mitto/data/another_test.xslx"
    ],
    "credentials": "my.email@mysite.com email",
    "html": "<h1>This is a test email...</h1>",
    "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. Files on the file page are located at /var/mitto/data/
  • credentials: This is the "Credential Name" from the previous step.
  • mail from: your email address.
  • mail to: you can include multiple recipients.
  • server: the smtp server you're using. smtp.office365.com for Outlook. smtp.gmail.com for Gmail.

Click "Done" to save the job.

Finally, change the job type to "email" as follows:

Send an email

To send an email click the "Start" button at the top of the job page.