> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Setup and Content Validation

> Validate your MoEngage email setup by testing campaigns, verifying authentication, checking SSL branded links, and confirming delivery statistics.

After your email setup is complete, execute the following steps to validate the configurations done on your dashboard:

* [Publish a test campaign to yourself](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#publish-a-test-campaign-to-yourself)
* [Compliance check](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#compliance-check)
* [SSL-branded links verification](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#verify-ssl-branded-links)
* [Test the unsubscribe link](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#test-the-unsubscribe-link)
* [Stats validation](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#stats-validation)

## Publish a Test Campaign to Yourself

To perform any test (such as authentication test, Unsubscribe Link test, stats validation) to verify email settings, you must publish a test email campaign to yourself first. Follow the below steps to send a test email campaign to yourself.

1. In your MoEngage Dashboard, go to **Segment** > **User Imports** and click **Import Users**.
2. Upload a CSV file with your email address.
   * Include an @gmail.com or G-Suite-hosted email address.
   * You must select **Anonymous users** under **Select user type** while uploading a CSV file. For more information, refer to [Import User Data](/user-guide/data/imports/file-based-imports/import-user-data-using-csv).
     <img alt="anonymous user.png" src="https://mintcdn.com/moengage/-uVFLyK4XoHTd5WE/images/moengage_097766.png?fit=max&auto=format&n=-uVFLyK4XoHTd5WE&q=85&s=db3a75c182ae518c5281c7f258041ce2" width="2746" height="986" data-path="images/moengage_097766.png" />
   * Under **Map columns**, you must map the **Email** column with the existing profile attribute **Email (Standard)**.
     <img alt="map email.png" src="https://mintcdn.com/moengage/t_8awpRKFC9RNHlT/images/moengage_aa2c2c.png?fit=max&auto=format&n=t_8awpRKFC9RNHlT&q=85&s=475fabf8ddd3c5e8317e2a93daf19589" width="2694" height="1248" data-path="images/moengage_aa2c2c.png" />
3. Create a custom segment and save it as **test\_email\_settings**. For more information, refer to [Custom Segments](/user-guide/segment/segment-operations/custom-segments).
4. Create a test email campaign and send it to the custom segment created above. For more information, refer to [Create Email Campaign](/user-guide/campaigns-and-channels/email/create/create-an-email-campaign).
   * The email body can contain any generic content, but make sure to include a regular link and an unsubscribe link.
   * You can use the correct replacement tags for the unsubscribe link. You cannot add the unsubscribe link if the unsubscribe option is selected as **None** in the **Unsubscribe Settings** section.

## Compliance Check

### Step 1: Publish a Test Campaign to Yourself

To publish a test campaign yourself, refer to the above [section](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#publish-a-test-campaign-to-yourself).

### Step 2: Open the Test Email Header

Open the test email campaign you sent yourself and click **Show Original** as shown in the following image:

<img alt="Auth 1.png" src="https://mintcdn.com/moengage/UX7SFw6G5JwoHWFq/images/moengage_5f807c.png?fit=max&auto=format&n=UX7SFw6G5JwoHWFq&q=85&s=4f5bf5b263ba0f6d4a13e1a5f7bb4003" width="2040" height="984" data-path="images/moengage_5f807c.png" />

### Step 3: Look for the Headers Necessary for Compliance

In the following HTML page, look for the headers listed below necessary for compliance.

* Search for **Authentication-Results**:
  * Results must have [SPF](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-glossary#spf), [DKIM](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-glossary#dkim), and [DMARC](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-glossary#dmarc).
  * Results must be PASS for all three (SPF, DKIM, and DMARC).
  * To prevent spoofing of your domain, add strict [DMARC](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-glossary#dmarc).

    ```text Code wrap theme={null}
    Authentication-Results: atlas-production.v2-mail-prod1-gq1.omega.yahoo.com;
    dkim=pass header.i=@moenews.moengage.com header.s=pmt;
    dkim=pass header.i=@sendgrid.info header.s=smtpapi;
    spf=pass smtp.mailfrom=pmt.moenews.moengage.com;
    dmarc=pass(p=REJECT,sp=REJECT) header.from=moenews.moengage.com;
    ```

    <Info>
      You can start with a p=none; sp=none policy. Send the reports to a DMARC monitoring tool. Monitor, fix authentications, and slowly enforce 100% strict DMARC.
    </Info>
* Search for **Received: from**

  * You will see the IP with its forward DNS.
  * Gmail rejects emails sent from IPs without a valid forward and reverse DNS.
  * In the same **Received: from**, you can also see the TLS version.

    ```text Code wrap theme={null}
    Received: from o1704.dba.appalerts.moengage.com (o1704.dba.appalerts.moengage.com [159.183.136.128])
    by mx.google.com with ESMTPS id af79cd13be357-794b4bb4bb4si515498585a.305.2024.05.27.08.36.30
    for <john.doe@example.com>
    (Version=TLS1_3 cipher =TLS_AES_128_GCM_SHA256 bits=128/256);
    ```
* Search for **List-Unsubscribe**:\
  You must see two headers:
  * **List-Unsubscribe: `<>`**
    * It must include an HTTPS URL.
  * **List-Unsubscribe-Post: List-Unsubscribe=One-Click**
    * It is static and fixed.

      ```text Code wrap theme={null}
      List-Unsubscribe: <mailto:unsubscribe@pmt.moenews.moengage.com?subject=https://link.moengage.com/ss/su/u001.RTpx4EJS3-0i5gtpC9vtzQ/46p/J0qQyBvRRTKjhs4UuGOTOg/um/h001.tuKCex1vFwY4ol0fZjDCDM0mCya9o04aOtlc0YJeIfE>,<https://link.moengage.com/lu/unsubscribe?oc=u001.5y6sKFQeHCQG7JHncsOumERtTWcPPtilX9ReiM5Pod4PrlY4NMFtC-6Cx4CSsG7OajrnrjuWS9Op-V-Lj3P0ZAr5FA0PgszKwHfIvy9Wf4mHnvOK5S2IsKem3HbsanLWdJRcbHCuBg0jF7BS5A-5IfCd5aSkqitXAiofUonUDxyfjHfn6nlwk7okVFXUWu-Et1n5vHH06Hb35K8MIvuKNQ>
      List-Unsubscribe-Post: List-Unsubscribe=One-Click
      ```

## Verify SSL Branded Links

This verification is required to check whether your links are secured or not.

### Step 1: Publish a Test Campaign to Yourself

To publish a test campaign yourself, refer to the above [section](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#publish-a-test-campaign-to-yourself).

### Step 2: Hover Over Any URL/CTA Button

* Open the email and hover over any link or button.
* The URL you see in the bottom left must be your domain.
* The URL should be HTTPS (it might take a few seconds for HTTPS to show up).
  * Alternatively, you can copy the URL and paste it into any text editor.
    * The domain must be your domain.
    * The link must start with HTTPS.

<img alt="Link Branding.png" src="https://mintcdn.com/moengage/50ZszvUJB4M_6y_L/images/moengage_e8a202.png?fit=max&auto=format&n=50ZszvUJB4M_6y_L&q=85&s=8b1c663c51e226e71704557fb6ee1bff" width="1568" height="1398" data-path="images/moengage_e8a202.png" />

### Step 3: Verify Click Tracking

To verify click tracking, click on any link inside the email body.

* You must be redirected to the original URL you added in the email.
* The email campaign analytics must display the *click event*. For more information on email campaign analytics, refer [here](/user-guide/campaigns-and-channels/email/analyze/email-analytics-and-info).
* The **Activity** section in your [user profile](/user-guide/segment/reachability/user-reachability#user-profile) must display the *click even*t.

## Test the Unsubscribe Link

### Step 1: Publish a Test Campaign to Yourself

To publish a test campaign yourself, refer to the above [section](#h_01HTWMMAYG6CXV7ZB9Y3YDDC91).

### Step 2: Click the Unsubscribe Link

* Open the email and click the unsubscribe link.
* If you have used the replacement tags, the unsubscribe link must be within the email body. Otherwise, it will be outside the email body as shown in the following image:
  <img alt="Screenshot 2024-06-19 at 16.14.54.png" src="https://mintcdn.com/moengage/Vec55CKt-wYQ1h5L/images/moengage_449f84.png?fit=max&auto=format&n=Vec55CKt-wYQ1h5L&q=85&s=0ba774a0b69d0e13932f8c6db44683e9" width="1844" height="580" data-path="images/moengage_449f84.png" />

### Step 3: Verify Unsubscribe Status and Reachability

* Click the unsubscribe link.
* Verify if the landing page or unsubscribe flow is working as you expected.
* Go back to the MoEngage UI and verify if:
  * Unsubscribe is tracked in the [stats](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#stats-validation).
  * [Reachability](/user-guide/segment/reachability/user-reachability) is updated in your profile.

## Stats Validation

### Step 1: Publish a Test Campaign to Yourself

To publish a test campaign yourself, refer to the above [section](/user-guide/campaigns-and-channels/email/getting-started-with-email/email-setup-and-content-validation#publish-a-test-campaign-to-yourself).

### Step 2: Engage with the Email You Have Received

* Open the email.
* Click any link in the email body.
* Click the unsubscribe link.

### Step 3: Verify the Stats

Verify if events are populating as expected. Campaign stats must show:

* Sent
* Delivered
* Open
* Click
* Unsubscribe

<img alt="campign.png" src="https://mintcdn.com/moengage/eF2J43N9Ckga5Apm/images/moengage_2d2be8.png?fit=max&auto=format&n=eF2J43N9Ckga5Apm&q=85&s=521ce6d97bf5f26c162397fec5f23744" width="2686" height="1332" data-path="images/moengage_2d2be8.png" />

It might take a few minutes for the stats and user profile to populate.

# Validations to be Performed Before Publishing the Email

Executing the steps above helps you test the email settings after the setup. You are advised to use the features below before publishing a campaign to ensure your emails work as you expect:

## Check the Email Campaign Content

* **Preview the Email Content in the Editor:** Preview the email content while creating it using the [drag-and-drop](/user-guide/campaigns-and-channels/email/create/create-content-with-the-drag-and-drop-editor) or [Custom HTML editor](/user-guide/campaigns-and-channels/email/create/create-content-with-custom-html-editor). Use this method to perform a sanity check on the rendering of your email content. Note that the addition of unsubscribe or manage preference links and open/click tracking related changes do not occur since no email has been sent.
* **Inbox Previews:** Preview your email content across a combination of devices, email clients, and web browsers. Use this method to check the email is rendering properly on the combinations used by your email subscribers. Since no email has been sent, the addition of links or tracking related changes doesn't occur here either. For more information, refer to [Inbox Previews](/user-guide/campaigns-and-channels/email/create/inbox-previews).
* **Test Campaign**: This method helps you check the email content by sending an actual email. Since an email is sent out, clicks and open stats, unsubscribe and manage preference links all get included in this email. Use this method to perform the final rendering check and validate the link's redirection before publishing a campaign.
