# Email Notification Settings

This guide explains how to configure Teleskope email settings in order to send policy violation alert emails from your organization's domain using SendGrid domain authentication.

## Overview

Teleskope sends policy violation alerts via email through SendGrid. By default, emails are sent from `no-reply@teleskope.ai`. To send emails from your own domain, configure the sender address in Teleskope and add DNS records to your domain so SendGrid can send on your behalf.

## Step-by-Step Setup

{% stepper %}
{% step %}
**Navigate to Email Settings**

Go to **Settings > Notification Settings** in Observatory.
{% endstep %}

{% step %}
**Configure the Sender Email Address**

The sender email is composed of three parts:

```
[User] @ [Subdomain] . [Domain]
```

* **User**: the local part of the email (e.g., `alerts`, `automation`)
* **Subdomain**: a subdomain you designate for sending (e.g., `notifications`, `em`)
* **Domain**: your organization's domain (e.g., `yourcompany.com`)

Example: `alerts@notifications.yourcompany.com`

Fill in all three fields and click the Save icon.
{% endstep %}

{% step %}
**Set the User Name**

Enter the name that appears in the "From" field of the email (e.g., "Teleskope Alerts", "Security Team"). Click Save.
{% endstep %}

{% step %}
**Add DNS Records to Your Domain**

After saving the domain settings, a table of DNS records appears at the bottom of the page. These records are generated by SendGrid and must be added to your domain's DNS configuration.

The table shows:

| Column | Description                                                     |
| ------ | --------------------------------------------------------------- |
| Status | **Pending** (not yet verified) or **Verified** (DNS propagated) |
| Type   | The DNS record type (CNAME or TXT)                              |
| Host   | The DNS hostname to create                                      |
| Value  | The value to set for that record                                |

There are two categories of records:

**Domain Authentication** (typically 3 CNAME records)\
These prove to email providers (Gmail, Outlook, etc.) that SendGrid is authorized to send email on behalf of your domain. They enable DKIM signing and SPF alignment.

**Link Branding** (typically 2 CNAME records)\
These rewrite tracking links in the email body to use your domain instead of `sendgrid.net`, improving deliverability and trust.

**How to add the records:**

1. Log in to your DNS provider (e.g., Cloudflare, Route 53)
2. For each row in the table, create a DNS record with:
   * **Type**: as shown (usually CNAME)
   * **Name/Host**: as shown in the Host column
   * **Value/Target**: as shown in the Value column
   * **TTL**: default (or 3600)
     {% endstep %}

{% step %}
**Wait for DNS Propagation**

DNS changes can take up to 48 hours to propagate, though most complete within minutes to a few hours. Teleskope automatically checks verification status with SendGrid each time you load the settings page.

Once all records show **Verified**, your domain is authenticated and emails will be sent from your configured address.
{% endstep %}

{% step %}
**Optional: Configure CC Emails**

Enter a comma-separated list of email addresses that should be copied on every policy alert email. Click Save.
{% endstep %}

{% step %}
**Optional: Configure Reply-To**

Set a Reply-To name and email address. When recipients reply to an alert email, the reply goes to this address instead of the sender. Click Save.
{% endstep %}

{% step %}
**Optional: Set a Logo URL**

Enter a URL to your organization's logo (PNG or JPG). This logo will appear in the header of policy alert emails. Click Save.
{% endstep %}
{% endstepper %}

## Troubleshooting

{% hint style="warning" %}
**DNS records show "Pending" after 48 hours**\
Verify the records were added correctly in your DNS provider. Check for typos in the Host or Value fields. Some providers require you to omit the base domain from the Host (e.g., enter `em1234` instead of `em1234.yourcompany.com`).
{% endhint %}

{% hint style="warning" %}
**Emails not being received**\
Check that the domain is verified (all records show "Verified"). Check the recipient's spam/junk folder. Ensure the sender address is not blocked by the recipient's email provider.
{% endhint %}

{% hint style="warning" %}
**"Failed to load DNS records" error**\
This indicates a connectivity issue with SendGrid. Try refreshing the page. If the issue persists, contact Teleskope support.
{% endhint %}

## Settings Reference

| Setting        | Description                        | Example                         |
| -------------- | ---------------------------------- | ------------------------------- |
| User           | Local part of sender email         | `alerts`                        |
| Subdomain      | Sending subdomain                  | `notifications`                 |
| Domain         | Organization domain                | `yourcompany.com`               |
| User Name      | Display name in "From" field       | `Teleskope Alerts`              |
| CC Emails      | Comma-separated CC recipients      | `admin@co.com, security@co.com` |
| Reply To Name  | Name shown when recipient replies  | `Security Team`                 |
| Reply To Email | Address replies are sent to        | `security@yourcompany.com`      |
| Logo URL       | URL to logo image for email header | `https://cdn.co.com/logo.png`   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teleskope.ai/alerting-integrations/email-notification-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
