# SMTP Credentials

### What Are SMTP Credentials?

SMTP credentials allow SEO Utils to send automated emails through your email server. This is essential for automating report delivery to clients and team members.

### Setting Up SMTP Credentials

To configure email sending capabilities, navigate to **SMTP** in the left sidebar and click **Add Credential**.

<figure><img src="/files/BcP8bkjGFNsuypmfabSH" alt=""><figcaption><p>SMTP Credentials management interface</p></figcaption></figure>

#### Configuration Fields

Fill in the following settings based on your email provider:

**Basic Settings:**

* **Credential Name**: A friendly name to identify this configuration (e.g., "Main Gmail Account")
* **Default Credential**: Toggle on to use this as the default for all email automations

**Server Settings:**

* **SMTP Host**: Your email server address (see provider settings below)
* **Port**: Usually `587` for TLS or `465` for SSL
* **Encryption**: Select TLS/STARTTLS (recommended) or SSL

**Authentication:**

* **Username**: Your email address or username
* **Password**: Your email password or app-specific password

{% hint style="warning" %}
**Gmail Users**: You must use an [App Password](https://support.google.com/accounts/answer/185833) instead of your regular password. Enable 2-factor authentication first, then generate an app password.
{% endhint %}

**Sender Information:**

* **From Email**: The email address that appears as sender
* **From Name**: Optional display name (e.g., "SEO Reports")

#### Testing Your Configuration

Before saving, always test your SMTP settings:

1. Enter a **Test Email Address** where you can receive mail
2. Click **Send Test Email**
3. Check your inbox for the test message
4. If successful, click **Create Credential**

<figure><img src="/files/oE8yrp7Oie39Htl5L7iQ" alt=""><figcaption><p>Test your SMTP configuration before saving</p></figcaption></figure>

### Common Email Provider Settings

#### Gmail

* Host: `smtp.gmail.com`
* Port: `587`
* Encryption: `TLS`
* Username: Your Gmail address
* Password: [App Password](https://myaccount.google.com/apppasswords) (not regular password)

#### Microsoft 365/Outlook

* Host: `smtp.office365.com`
* Port: `587`
* Encryption: `TLS`
* Username: Your email address
* Password: Your password

#### SendGrid

* Host: `smtp.sendgrid.net`
* Port: `587` (or `465` for SSL, `2525` as alternative)
* Encryption: `TLS`
* Username: `apikey` (literal string, not your username)
* Password: Your SendGrid API key

#### Mailgun

* Host: `smtp.mailgun.org`
* Port: `587` (or `2525` as alternative)
* Encryption: `TLS`
* Username: Your Mailgun email address
* Password: Your Mailgun API key

{% hint style="info" %}
**Tip**: Port `2525` is an alternative port offered by SendGrid and Mailgun if your ISP blocks standard ports. It works identically to port 587 with TLS encryption.
{% endhint %}

#### Custom/Business Email

Contact your IT administrator or hosting provider for:

* SMTP server address
* Port number
* Authentication requirements
* Encryption method

### Using SMTP in Automations

Once configured, your SMTP credentials are automatically available in the Automations tool. When creating an email action, simply:

1. Select **Send Email** as the action type
2. The system will use your default SMTP credential
3. Configure recipient, subject, and message content
4. Add attachments using variables like `{{pdf_export_path}}`

See the [Automations guide](/guide/automations.md) for detailed examples of email automation workflows.

### Troubleshooting

**Test email fails:**

* Verify your username and password are correct
* For Gmail, ensure you're using an App Password
* For SendGrid, use `apikey` as username (not your email)
* Check if your email provider requires specific security settings
* Try alternative ports (2525 for Mailgun/SendGrid if 587 is blocked)

**Emails not sending in automations:**

* Confirm the SMTP credential is marked as default
* Check automation execution logs for specific error messages
* Verify recipient email addresses are valid

**Connection timeout:**

* Your firewall or ISP may be blocking the SMTP port
* Try port 2525 as an alternative for SendGrid/Mailgun
* Try using port 465 with SSL encryption instead of 587/TLS


---

# 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://help.seoutils.app/guide/smtp-credentials.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.
