# Email Templates

> Complete guide to customizing all email notifications sent by WPsigner for signing requests, reminders, and more.

edition: both
Edition: Lite + Pro
AI note: This page applies to Lite and Pro. Call out Lite limits (PDF only, max 2 signers, email OTP, local timestamp) when they apply. Do not invent Pro-only features.
HTML: https://docs.wpsigner.com/customization/email-templates/
Markdown: https://docs.wpsigner.com/md/customization/email-templates.md
Source file: customization/email-templates.md

---

WPsigner sends automated emails throughout the document signing workflow. This page covers how to customize these emails to match your brand voice and provide a professional experience.

## Email Types

WPsigner sends five types of automated emails:

| Email | Purpose | When Sent |
|-------|---------|-----------|
| **Signing Request** | Invite signer to sign | When document is sent |
| **Reminder** | Follow-up for pending signatures | Automatically or manually |
| **Completed** | Notify all parties of completion | When all signers finish |
| **Declined** | Alert when signer refuses | When signer declines |
| **OTP Verification** | Identity verification code | When OTP is enabled |

---

## Why Customize Emails?

### Brand Consistency

| Default Emails | Customized Emails |
|----------------|------------------|
| Generic messaging | Your brand voice |
| Standard templates | On-brand design |
| WPsigner branding | Your company branding |
| Basic information | Tailored messaging |

### Better Results

Custom emails improve:
- **Open rates** - Familiar sender name and branding
- **Completion rates** - Clear, personalized instructions
- **Trust** - Professional, consistent experience
- **Engagement** - Brand-appropriate tone and messaging

---

## Accessing Email Templates

Navigate to:
1. **WPsigner** in the admin sidebar
2. Click **More** dropdown in the top navigation
3. Select **Email Templates**

Or go directly to: `WPsigner → More → Email Templates`

---

## Template Editor Interface

### Template Tabs

At the top, you'll see tabs for each email type:
- 📧 **Signing Request** - Invitation to sign
- 🔔 **Reminder** - Follow-up reminder
- ✅ **Completed** - Completion notification
- ❌ **Declined** - Decline notification
- 🔐 **OTP Verification** - Verification code

Click any tab to edit that template.

### Visual Editor

The editor provides:
- **Rich text editing** - Format text, add links, images
- **HTML mode** - Direct HTML editing for advanced users
- **Media library** - Insert images and files
- **Full toolbar** - All formatting options

### Variables Sidebar

On the right, you'll see available variables:
- Click any variable to insert it at cursor
- Variables are replaced with real data when sent
- Hover for descriptions

### Action Buttons

| Button | Function |
|--------|----------|
| **Preview** | See how email will look |
| **Send Test** | Send test email to yourself |
| **Save Template** | Save your changes |
| **Reset to Default** | Restore original template |

---

## Available Variables

Variables are placeholders that get replaced with real data. Use the `{{variable_name}}` syntax.

### Common Variables (All Templates)

| Variable | Description | Example Output |
|----------|-------------|----------------|
| `{{company_name}}` | Your company name | "Acme Corporation" |
| `{{company_logo}}` | Company logo URL | https://... |
| `{{signer_name}}` | Recipient's name | "John Smith" |
| `{{signer_email}}` | Recipient's email | "john@example.com" |
| `{{document_title}}` | Document name | "Service Agreement" |
| `{{sender_name}}` | Who sent the document | "Jane Doe" |

### Signing Request Variables

| Variable | Description |
|----------|-------------|
| `{{signing_url}}` | Unique signing link |
| `{{document_filename}}` | Original file name |
| `{{expires_at}}` | Expiration date |
| `{{custom_message}}` | Optional sender message |
| `{{require_wp_login}}` | Set when that signer must log in with a matching WordPress account. Use `{{#if require_wp_login}}` to show the extra sentence |
| `{{access_code}}` | Filled only when **Include access code in signing email** is on. Empty when the signer already knows the secret — see [Access codes](/core-features/security-compliance/#access-codes) |

### Reminder Variables

| Variable | Description |
|----------|-------------|
| `{{signing_url}}` | Signing link |
| `{{days_pending}}` | Days since sent |
| `{{expires_at}}` | Expiration date |
| `{{require_wp_login}}` | Same flag as the signing-request template — use `{{#if require_wp_login}}` |

### Completed Variables

| Variable | Description |
|----------|-------------|
| `{{completed_at}}` | Completion timestamp |
| `{{download_url}}` | Link to download signed PDF |
| `{{total_signers}}` | Number of signers |

### Declined Variables

| Variable | Description |
|----------|-------------|
| `{{declined_by}}` | Who declined |
| `{{declined_at}}` | When they declined |
| `{{decline_reason}}` | Reason provided |

### OTP Variables

| Variable | Description |
|----------|-------------|
| `{{otp_code}}` | Verification code |
| `{{otp_expires}}` | Code expiration time |

---

## Customizing Each Template

### Signing Request Email

This is the most important email—it initiates the signing process.

**Best Practices:**
- Clear subject line: "Document awaiting your signature"
- Personalize with signer name
- Explain what the document is
- Prominent call-to-action button
- Include expiration if applicable
- Offer alternative link for button issues

**Example Structure:**
```html
<p>Hello {{signer_name}},</p>

<p>{{sender_name}} has sent you a document that requires your signature:</p>

<p><strong>{{document_title}}</strong></p>

{{#if custom_message}}
<blockquote>{{custom_message}}</blockquote>
{{/if}}

<a href="{{signing_url}}">Review & Sign Document</a>

{{#if expires_at}}
<p>This document expires on {{expires_at}}</p>
{{/if}}
```

### Reminder Email

Remind signers who haven't completed signing.

**Best Practices:**
- Friendly, non-aggressive tone
- Explain why it's important
- Include urgency if deadline approaching
- Re-state what the document is
- Easy access to signing link

**Example:**
```html
<p>Hi {{signer_name}},</p>

<p>Just a friendly reminder that you have a document waiting for your signature.</p>

<p><strong>{{document_title}}</strong></p>

<a href="{{signing_url}}">Sign Now</a>

<p>This only takes a few minutes. If you have questions, contact {{sender_name}}.</p>
```

### Completed Email

Notify all parties that the document is finished.

**Best Practices:**
- Confirmation subject: "Document Completed"
- Celebrate the completion
- Provide download link
- Include completion timestamp
- Summarize who signed

**Example:**
```html
<p>Great news!</p>

<p>The document <strong>{{document_title}}</strong> has been signed by all parties.</p>

<p>Completed on: {{completed_at}}</p>

<a href="{{download_url}}">Download Signed Document</a>

<p>A copy has been sent to all signers for their records.</p>
```

### Declined Email

Alert the document owner when someone declines.

**Best Practices:**
- Clear subject: "Document Declined"
- Identify who declined
- Include their reason
- Suggest next steps

**Example:**
```html
<p>Unfortunately, {{declined_by}} has declined to sign the document:</p>

<p><strong>{{document_title}}</strong></p>

{{#if decline_reason}}
<p>Reason: "{{decline_reason}}"</p>
{{/if}}

<p>You may want to contact them to discuss their concerns or create a new document with modifications.</p>
```

### OTP Verification Email

Send verification codes for identity confirmation.

**Best Practices:**
- Clear subject: "Your verification code"
- Large, readable code
- State expiration time
- Security reminder not to share

**Example:**
```html
<p>Hello {{signer_name}},</p>

<p>Your verification code is:</p>

<h1 style="text-align: center; font-size: 32px;">{{otp_code}}</h1>

<p>This code expires in {{otp_expires}}.</p>

<p>If you didn't request this code, please ignore this email.</p>
```

---

## Preview and Testing

### Preview Feature

1. Click the **Preview** button
2. View how the email will appear
3. Switch between Desktop, Tablet, and Mobile views
4. Verify formatting and layout

### Send Test Email

1. Click **Send Test**
2. Enter your email address
3. Click **Send Test Email**
4. Check your inbox for the sample

The test email uses sample data so you can see real output.

---

## Design Best Practices

### Email Design Principles

| Principle | Implementation |
|-----------|---------------|
| **Mobile-first** | Most emails read on mobile |
| **Clear CTA** | Large, prominent button |
| **Minimal text** | Concise, scannable content |
| **Brand colors** | Match your brand |
| **White space** | Easy to read |

### Technical Considerations

| Consideration | Recommendation |
|---------------|----------------|
| **Image hosting** | Use absolute URLs |
| **CSS** | Inline styles only |
| **Width** | Max 600px for mobile |
| **Fonts** | System fonts for compatibility |
| **Alt text** | Always include for images |

### Accessibility

- Use sufficient color contrast
- Include alt text for images
- Don't rely on color alone for meaning
- Keep font sizes readable (14px+)

---

## Template HTML Structure

WPsigner emails use a responsive HTML structure:

```html
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Email Title</title>
</head>
<body style="margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; background-color: #f5f5f5;">
    <table role="presentation" width="100%" style="background-color: #f5f5f5;">
        <tr>
            <td style="padding: 40px 20px;">
                <table width="600" style="margin: 0 auto; background-color: #ffffff; border-radius: 16px;">
                    
                    <!-- Header -->
                    <tr>
                        <td style="background: linear-gradient(135deg, #3b82f6, #2563eb); padding: 30px; text-align: center;">
                            {{#if company_logo}}
                            <img src="{{company_logo}}" alt="{{company_name}}" style="max-height: 50px;">
                            {{/if}}
                            <h1 style="color: #ffffff;">{{company_name}}</h1>
                        </td>
                    </tr>
                    
                    <!-- Content -->
                    <tr>
                        <td style="padding: 40px 30px;">
                            <!-- Your content here -->
                        </td>
                    </tr>
                    
                    <!-- Footer -->
                    <tr>
                        <td style="background: #f8fafc; padding: 20px 30px; text-align: center;">
                            <p style="color: #999; font-size: 12px;">
                                This email was sent by {{company_name}}.
                            </p>
                        </td>
                    </tr>
                    
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
```

---

## Conditional Content

Use Handlebars-style conditionals for dynamic content:

### If/Then Blocks

```handlebars
{{#if custom_message}}
<div class="message-box">
    <p>Message from {{sender_name}}:</p>
    <p>{{custom_message}}</p>
</div>
{{/if}}

{{#if require_wp_login}}
<p>You must sign in with the WordPress account that uses this email. The signing link alone is not enough.</p>
{{/if}}
```

### With Else

```handlebars
{{#if company_logo}}
    <img src="{{company_logo}}" alt="Logo">
{{else}}
    <h1>{{company_name}}</h1>
{{/if}}
```

---

## Resetting Templates

To restore a template to its default:

1. Open the template you want to reset
2. Click **Reset to Default**
3. Confirm the reset
4. Template reverts to original

> **caution**
Resetting a template permanently removes your customizations. Save a backup before resetting.

---

## Email Deliverability

### SMTP Configuration

For reliable email delivery, configure SMTP:

1. Install an SMTP plugin (WP Mail SMTP, FluentSMTP)
2. Configure with your email provider
3. Test delivery with WPsigner test email feature

### Best Practices

| Practice | Why |
|----------|-----|
| **Use your domain** | Better deliverability |
| **Configure SPF/DKIM** | Authentication |
| **Monitor bounces** | Maintain sender reputation |
| **Avoid spam triggers** | Stay out of spam folder |

---

## Common Issues

### Emails not sending

1. Verify SMTP is configured
2. Check email address validity
3. Review server error logs
4. Test with WPsigner's Send Test feature

### Variables not replacing

- Check variable spelling exactly
- Ensure double curly braces: `{{variable}}`
- Preview to verify replacements

### HTML not rendering correctly

- Use inline CSS styles
- Avoid complex layouts
- Test in multiple email clients
- Use the Preview feature

---

## Next Steps

- [Whitelabeling](/customization/whitelabeling/) - Full branding options
- [Settings Overview](/getting-started/installation/) - All settings explained
- [Signer Workflows](/core-features/signer-workflows/) - Workflow options
