# 3.4.1 Email

This section allows you to set up the platform to receive emails from users. Before getting started, make sure that you have an email account set up on Gmail, Yahoo or any other service provider. Make sure that you have IMAP/POP enabled (For more information on these two protocols, [visit this website](http://www.pop2imap.com/). Instructions on how to enable the IMAP/POP settings in your email can be found here

***Gmail settings:*** Follow this guide to enable IMAP from external clients with [Gmail](https://support.google.com/mail/troubleshooter/1668960?hl=en). Keep in mind:\
There are a few settings you need to configure so that Ushahidi can pull from a Gmail account.

* <mark style="color:orange;">**Step 1: Check that IMAP is turned on**</mark>
  * On your computer, open [Gmail](https://mail.google.com/).
  * In the top right, click Settings   **See all settings.**
  * Click the **Forwarding and POP/IMAP** tab.
  * In the "IMAP access" section, select **Enable IMAP**.
  * Click **Save Changes**.
* <mark style="color:orange;">**Step 2: Check that Two-Factor Authentication is turned on**</mark>\
  One needs to have [Gmail's Two-Factor Authentication](https://myaccount.google.com/signinoptions/two-step-verification) enabled. Visit<https://www.google.com/landing/2step/>  if you do not have it enabled for your account.
* <mark style="color:orange;">**Step 3: Create an App password**</mark>\
  This is a 16-digit passcode that gives a non-Google app or device permission to access your Google Account. (Google Docs here:<https://support.google.com/mail/answer/185833?hl=en-GB>)
  * On your computer, open [App passwords](https://myaccount.google.com/apppasswords)
  * When prompted for "Select the app and device you want to generate the app password for":
  * Select “Mail” under the drop-down for “Select app”
  * Select “Other” under the drop-down for “Select device”
  * When prompted for text input, enter your Ushahidi deployment name

    (e.g. The name of my deployment is Free Media, I’ll enter “Ushahidi Free Media ”).
  * Copy the password to your clipboard that is automatically generated and save it somewhere (we would need this later).

***Yahoo settings:*** [Yahoo](https://help.yahoo.com/kb/SLN3697.html)

***

***Email setup on Ushahidi platform***

To get started with email the setup, click on ***the add source*** button on the top right as shown and select ***Email.***

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FSGUxKc9nLvn9iJS1xURq%2F3.4.3.png?alt=media&#x26;token=a50e0c4c-ed8e-4569-a2db-024a1f65e100" alt="Add sources button highlighted in Data Sources Page To add a data source"><figcaption><p>Add sources button highlighted in Data Sources Page To add a data source</p></figcaption></figure>

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FhB1QdjybQpDOuabIoq5R%2F3.4.4.png?alt=media&#x26;token=b5e41259-2dc4-4d09-92c9-e7da0f0e3a42" alt="Type Of Data Sources drop down menu listing the available data sources -red arrow pointing to email data source"><figcaption><p>Type Of Data Sources drop down menu listing the available data sources</p></figcaption></figure>

***

***Input the following email account settings***

* ***Incoming server type***: You have two options to select from, ***POP*** and ***IMAP***. We recommend using IMAP if possible because it’s the best way to make sure you can see all your mail at any time on all of your devices
* ***Incoming server***: Enter the address of the server where your email services are hosted. E.g *mail.yourwebsite.com and for Gmail: imap.gmail.com*&#x20;
* ***Incoming server port***: Enter the port that your email account uses for incoming emails. This is also provided by your service provider and depends on the use of [SSL(Secure Sockets Layer)](https://www.digicert.com/ssl.htm)/[Transport Layer Security(TLS)](https://en.wikipedia.org/wiki/Transport_Layer_Security) or not. As a standard rule;
  * Enter 993 (Since we’re using IMAP) for Gmail.
  * POP uses port 110 , but SSL/TLS encrypted POP uses port 995
* ***Incoming server security***: You have 3 options to choose from to enhance secure connection to your email mailbox, depending on which is supported by your email service provider.
  * None
  * TLS - [Read more on Transport Layer Security](https://en.wikipedia.org/wiki/Transport_Layer_Security)
  * SSL - [Read more on Secure Sockets Layer](https://www.digicert.com/ssl.htm) for Gmail
* ***Incoming user name***: Enter the email address you want to use to receive emails e.g ***<sample@youremail.com>***. We recommend setting up a separate email address for this purpose, preferably one that has a lot of available space to avoid the account getting full in a short time, especially if the platform will be receiving a lot of submissions via email.
* ***Incoming password***: Enter the password of the email account inserted above.\
  Enter the “App password” generated above for the gmail account.  &#x20;

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2F8BliCtXdeqnFmcrKyMT9%2F3.4.5.png?alt=media&#x26;token=b7fe8313-297f-45ca-87e7-e465b09d40b0" alt="Adding Email Data Source Page - Email account settings"><figcaption><p>Adding Email Data Source Page -Form to input email account settings</p></figcaption></figure>

***

***Next:***

* Click on ***Save*** and this data source’s settings will be saved. Unstructured posts from email will now be pulled into the platform.
* If you’d like to edit your email configuration, simply click on the the email data source to see the edit form, and make your changes.
* If you no longer want the email data source simply click on the data source as if you want to edit it and the use the delete button.

<figure><img src="https://1490970077-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGBEUb85x3qZ9AiwfCkhF%2Fuploads%2FQzuif2ubfjFUS4uIifM7%2F3.4.6.png?alt=media&#x26;token=72ba8bd1-27b1-49fc-bc4b-53812018269e" alt="Import to Survey toggle button pointed by red arrow in the Add Data Source page"><figcaption><p>Import to Survey toggle button pointed by red arrow in the Add Data Source page</p></figcaption></figure>

***Note:*** Reports coming via email will take a while before they reflect on the platform because there is a “job” that needs to be run in the database and those jobs run every 10 minutes or so.
