Part of the ElmsPark Plugin Suite

Professional email for
PageMotor

EP Email provides SMTP delivery, contact forms powered by JSON, email templating, delivery logging, queue management, and a developer extension API.

Installation Guide Contact Forms →

What does EP Email do?

By default, PageMotor sends email using your server’s built-in mail() function. This works, but emails are frequently blocked, delayed, or marked as spam — because your server isn’t recognised as a trusted email sender.

EP Email fixes this by routing your emails through a proper SMTP server — the same way Gmail, Outlook, and every other email provider delivers mail.

📬

SMTP Delivery

Route all outgoing email through your SMTP provider for reliable delivery. Supports SSL/TLS, authentication, and custom ports.

📝

Contact Forms

Build powerful contact forms using JSON definitions — conditional logic, custom field types, and validation built in.

📋

Email Logging

Track every email sent through your site. View delivery status, recipient, subject, and timestamps.

🔧

Extension API

Build premium add-ons that extend contact forms with custom field types, validation rules, and submission hooks.

Installing EP Email

EP Email installs like any PageMotor plugin. The process takes under a minute.

1

Download EP Email

Download the ep-email.zip file from your ElmsPark account or the link provided with your purchase.

2

Log into your PageMotor admin

Go to yourdomain.com/admin/ and sign in.

3

Navigate to Plugins

Click Plugins in the admin navigation, then Manage Plugins.

4

Upload the zip file

Use the plugin upload interface to upload ep-email.zip. PageMotor will extract it to the correct location automatically.

5

Activate EP Email

In your active Theme’s plugin configuration, enable EP Email. It will create its database tables automatically on first load.

How to verify: After activation, go to Plugins → Plugin Settings. You should see EP Email Settings with SMTP configuration, contact form settings, and the delivery log. If you see it, you’re installed and ready to go.

Setting up SMTP delivery

SMTP is the industry standard for sending email reliably. EP Email connects to your SMTP provider to deliver messages that actually reach inboxes.

1

Open EP Email Settings

Go to Admin → Plugins → EP Email (Settings).

2

Enter your mail server details

Under SMTP Settings, fill in the host, port, encryption, username, and password for your mail provider.

3

Test the connection

Click Test Connection to verify your SMTP credentials without sending an email.

4

Send a test email

Click Send Test Email to confirm end-to-end delivery to an actual inbox.

SMTP Settings Reference

SettingDescription
SMTP HostMail server hostname (e.g. smtp.gmail.com, smtp.office365.com)
SMTP PortUsually 587 (TLS) or 465 (SSL)
EncryptionTLS (recommended), SSL, or None
UsernameSMTP authentication username
PasswordSMTP authentication password
From NameSender name for outgoing emails
From EmailSender email address
💡

Tip: Test Connection verifies your SMTP credentials without sending an email. Use Send Test Email to confirm end-to-end delivery.

⚠️

Gmail users: You’ll need an App Password — regular passwords won’t work with SMTP. Go to your Google Account → Security → 2-Step Verification → App Passwords.

Building contact forms

EP Email includes a powerful contact form system. Define forms in JSON and render them with a shortcode — with conditional logic, custom field types, and built-in validation.

Adding a Form

The [ep-email] shortcode renders forms defined in JSON:

1

Define your form

Go to EP Email Settings → Contact Forms and enter your form JSON in the Forms JSON field.

2

Place the shortcode

Use [ep-email name="form-name"] on any page to render your form.

JSON Structure

Each form is a named object containing a recipient, subject, success message, button text, and an array of fields:

{
    "contact": {
        "recipient": "info@example.com",
        "subject": "Contact from {name}",
        "success": "Thanks! We'll reply within 24 hours.",
        "button": "Send Message",
        "fields": [
            {"type": "text", "name": "name", "label": "Name", "required": true},
            {"type": "email", "name": "email", "label": "Email", "required": true},
            {"type": "textarea", "name": "message", "label": "Message",
             "rows": 5, "required": true}
        ]
    }
}

Form Properties

PropertyDescription
recipientEmail address that receives form submissions (required)
subjectEmail subject line. Use {field_name} for placeholder substitution.
successMessage shown after successful submission
buttonSubmit button text. Default: “Send Message”
fieldsArray of field definitions
messagesCustom validation and UI messages (optional)

Field Types

TypeDescription
textSingle-line text input
emailEmail address with validation
textareaMulti-line text area
selectDropdown menu
checkboxSingle checkbox or checkbox group
radioRadio button group
hiddenHidden field (not visible to user)
fileFile upload (requires File Uploads extension)

Field Properties

PropertyTypeDescription
typestringField type (required)
namestringForm field name (required)
labelstringDisplay label
requiredbooleanMake field required
placeholderstringPlaceholder text
rowsintegerTextarea rows
optionsarrayOptions for select/checkbox/radio
conditionalobjectShow/hide based on another field

Conditional Logic

Show or hide fields based on another field’s value:

{
    "type": "select",
    "name": "department",
    "label": "Department",
    "options": ["Sales", "Support", "Billing"]
},
{
    "type": "text",
    "name": "order_number",
    "label": "Order Number",
    "conditional": {"field": "department", "value": "Billing"}
}

The order_number field only appears when “Billing” is selected. Multiple values are supported: "value": ["Support", "Billing"]

Custom Messages

Override default UI messages per form:

{
    "contact": {
        "recipient": "info@example.com",
        "messages": {
            "sending": "Submitting your enquiry...",
            "error": "Something went wrong. Please try again.",
            "network_error": "Connection failed. Check your internet.",
            "required": "{label} is required.",
            "invalid_email": "Please enter a valid email for {label}.",
            "success": "Thanks! We'll be in touch soon."
        },
        "fields": [ ... ]
    }
}

Messages Reference

KeyDefaultWhen shown
sending“Sending…”Button text while submitting
error“Failed to send message. Please try again.”Server error
network_error“An error occurred. Please try again.”Network failure
required“{label} is required.”Missing required field
invalid_email“{label}: Please enter a valid email address.”Bad email format
💡

Subject placeholders: Use {field_name} in the subject property to insert submitted values. For example, “Contact from {name}” becomes “Contact from John Smith”.

Extending EP Email

EP Email’s extension system lets developers build add-ons that integrate deeply with the contact form engine. Extensions can register custom field types, hook into submissions, add settings, and modify frontend behaviour.

🔨

Custom Fields

Register new field types — file uploads, signatures, ratings, date pickers. Extensions handle rendering, validation, and email integration.

🔌

Submission Hooks

Hook into the submission pipeline — validate fields, modify email arguments, trigger post-send actions like auto-responders or webhooks.

⚙️

Settings Integration

Add configuration fields to the EP Email settings page. Keys are auto-prefixed to avoid collisions.

💻

JS Hooks

Frontend JavaScript hooks let add-ons modify form behaviour — append data, react to submission success, clean up after reset.

📖

Full developer documentation: For the complete Extension API reference including all hooks, methods, and examples, see the EP Email Extension Developer Guide.

Building an Extension

An EP Email extension is a standard PageMotor plugin that registers an EP_Email_Extension subclass:

1

Create a PageMotor plugin

Your plugin must be a PM_Plugin subclass with a valid plugin header.

2

Check for EP Email

In construct(), verify class_exists('EP_Email_Extension') before proceeding.

3

Require your extension class

Include the file containing your EP_Email_Extension subclass.

4

Register the extension

Create an instance and call EP_Email_Extension::register().

Quick Start Example

// In your plugin's construct() method:
public function construct() {
    if (!class_exists('EP_Email_Extension'))
        return;

    require_once $this->path . '/includes/class-my-extension.php';
    $ext = new My_Extension();
    EP_Email_Extension::register($ext);
}

File Uploads add-on

The EP Email File Uploads extension adds drag-and-drop file upload fields to your contact forms. Files are attached directly to the notification email as MIME attachments — they are not stored on your server.

Usage

Add a file field to any form by using "type": "file" in your JSON definition:

{
    "application": {
        "recipient": "hr@example.com",
        "subject": "Application from {name}",
        "fields": [
            {"type": "text", "name": "name", "label": "Full Name", "required": true},
            {"type": "email", "name": "email", "label": "Email", "required": true},
            {"type": "file", "name": "resume", "label": "Resume / CV", "required": true}
        ]
    }
}

Configuration

File upload settings are configured in EP Email Settings under the File Uploads section:

SettingDescription
Max File SizeMaximum size per file (default: 5 MB). Limited by your server’s upload_max_filesize PHP setting.
Max FilesMaximum number of files per upload field (default: 3).
Allowed TypesComma-separated list of permitted file extensions (e.g. pdf,doc,docx,jpg,png).
💡

How it works: Files are uploaded temporarily during form submission, attached to the outgoing email, and then deleted. No files are stored on your server permanently. This keeps your site clean and avoids storage management.

Tracking delivery

EP Email maintains a complete log of every email your site sends. The log records the recipient, subject, delivery status, and timestamp for each message.

📋

Delivery Log

View every email sent from your site. Filter by status, search by recipient or subject, and diagnose delivery issues at a glance.

🔄

Email Queue

Failed emails can be queued for automatic retry. The queue processes on page loads, ensuring messages eventually reach their destination.

💡

Tip: For most sites, direct delivery is all you need. Enable the queue only if you send high volumes of email (e.g. through EP Newsletter or EP Bookings) and want automatic retry for temporary failures.

Common questions & fixes

Check your host, port, encryption, and credentials. Verify them against your email provider’s documentation. Use Test Connection in EP Email Settings to isolate the issue. Common mistakes: wrong port for the selected encryption, or a regular password instead of an app password.

Use a proper SMTP provider, set SPF and DKIM records in your domain’s DNS, and ensure your From Email address uses your own domain — not a free email like gmail.com. A matching From address and authenticated domain are the two biggest factors in inbox placement.

Verify that the name attribute in your shortcode matches the form key in your JSON definition. For example, if your JSON defines a form under "contact", your shortcode must be [ep-email name="contact"]. Also check that your JSON is valid — a missing comma or bracket will silently prevent the form from rendering.

Ensure the EP Email File Uploads extension is installed and active in your Theme’s plugin configuration. Also check your PHP upload_max_filesize and post_max_size settings — if the server limit is lower than the configured max file size, uploads will be rejected silently.

This means the form submitted correctly but the email failed to send. Go to EP Email Settings, verify your SMTP credentials with Test Connection, and check the delivery log for error details. Common causes: expired app password, SMTP server temporarily unavailable, or the From Email rejected by the provider.

Verify your extension is registered correctly: EP_Email_Extension::register() must be called in your plugin’s construct(). Check that field_types() returns the type name and render_field() returns valid HTML. If the extension plugin isn’t active in your Theme, its field types won’t be available.

Ensure the field name in the placeholder matches a field name in your form definition exactly. If your field is "name": "full_name", the subject placeholder must be {full_name}, not {name}. Placeholder substitution is case-sensitive.

The ElmsPark Plugin Suite

EP Email is one part of a growing collection of professional PageMotor plugins designed to work together seamlessly.

📧
EP EmailAvailable now
🔒
EP GDPRAvailable now
📰
EP NewsletterComing soon
📅
EP BookingsComing soon