# 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="https://1176579443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2DwV6sJBiKjUHMDggb4d%2Fuploads%2Fgit-blob-ea019aa98663c32743be9766002f1a7d88a323c1%2FXnapper-2025-09-17-22.44.40.png?alt=media" 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="https://1176579443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2DwV6sJBiKjUHMDggb4d%2Fuploads%2Fgit-blob-4c0af70fb0825567f7ccacd4f8ec2fa1955e77c5%2FXnapper-2025-09-17-22.51.23.png?alt=media" 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](https://help.seoutils.app/guide/automations) 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
