=== Ultimate WP Mail ===
Contributors: Rustaurius, EtoileWebDesign
Tags: email notifications, sms notifications, woocommerce notifications, email log, smtp
Requires at least: 5.0
Tested up to: 7.0
Stable tag: 1.3.12
License: GPLv3
License URI:http://www.gnu.org/licenses/gpl-3.0.html

Custom email and SMS notifications. Automatic send actions. WPForms SMS integration. WooCommerce notifications for purchases, abandoned cart and more!

== Description ==

Versatile plugin that lets you send email and SMS notifications to your users and that also integrates with **WooCommerce** and **WPForms** to offer enhanced notifications for those plugins, as well as being a full-featured SMTP and email logging solution.

### Key Features

- Send email messages to specific users, lists or all users.
- Trigger automatic email notifications based on specific actions or events.
- Trigger automatic SMS notifications based on specific actions or events.
- Trigger custom **WooCommerce** SMS or email notifications for specific actions, including a new purchaser, an abandoned cart, etc.
- Add SMS notifications to **WPForms** submissions.
- Full email logging, so you can keep track of sent emails and troubleshoot any sending issues.
- Add your SMTP info, so you can route emails via your real address/server and greatly reduce the chances of them getting blocked/marked as spam.

### Advanced Email Notifications 

With Ultimate WP Mail, you can quickly and easily create an unlimited number of customized email messages and templates, which you can send directly to registered users on your site. You can send one-time emails to specific users or create templates that you can use repeatedly, such as when creating custom send events (discussed below), and which can be sent to individual users, all users or to specific **lists of users** that you can put together in the plugin. 

With an easy-to-use **visual designer**, you can craft your email templates in no time. Or just use one of our included base templates! And, with the smart previewing features, you'll be able to see what your email will look like before sending it. 

### SMS Notifications (ultimate version feature)

The ultimate version of the plugin also comes with the ability to send SMS notifications. These can be sent manually or automatically via triggers and send actions that you can create (more on that below). Imagine being able to text your customer with order details or site updates. A much more effective way to notify them. These can also be integrated with the available WooCommerce features (discussed below). 

By combining the SMS notifications with email notifications, you can greatly improve not only your ability to reach your users and customers in a timely manner, but also **improve your CRM while automating the workflow on your end**!

### WooCommerce Notifications

Ultimate WP Mail comes with a suite of built-in WooCommerce integration features that give you the ability to send emails or SMS notifications to WooCommerce users on your site, including specific subsets of users (e.g. previous purchasers of a certain product), and also to create automatic **WooCommerce email** and **WooCommerce SMS** send triggers for specific actions (e.g. when someone has an abandoned cart, when a new product is added, etc.). 

WooCommerce notification features include:

- Send a custom SMS and/or email message to new and past purchasers of specific products or products within a specific category.
- Mix and match this with custom lists you've created for targeted WooCommerce emails. The perfect **CRM for WooCommerce**!
- Assign a specific email or SMS notification to send to users when a new product is added.
- Automatically notify users who have an abandoned cart, to help boost WooCommerce conversions.
- Send an automatic message a specific amount of time after a WooCommerce purchase (e.g. as a follow up or requesting a review, etc.)

### WPForms SMS Notifications (ultimate version feature)

The ultimate version of the plugin also integrates directly with the WPForms plugin. Now, when you create a new form in WPForms, you can add SMS notification triggers, which allow you to send an SMS messages directly to people who fill out the form, so you can make sure they know their submission was received and provide them with any necessary info. 

You also have the ability to make the SMS notification dependent on a specific input value in the form, so you can keep your customers/users updated and provide them with real-time feedback.

Not only is this helpful to reassure your users and keep them engaged, but it provides you with a new avenue for marketing and/or CRM, via a method the user is much more likely to view and actually read.

This can all be set up directly in the WPForms plugin when creating your new form or modifying an existing one. We've built it as a new panel in the WPForms editor, so you can stick to the workflow you're already used to and easily set up your SMS notifications.

### Automatic Send Events/Triggers

Ultimate WP Mail comes with the ability to create send events. These are triggers that will automatically send out a notification (email and/or SMS) when something specific happens on your site. There are many available send events, including the WooCommerce features mentioned above as well as site-specific triggers like when a profile is updated, a password is changed, a new post is published, a new comment is created, and more. 

You can assign any email or SMS that you have created in the plugin to each send event. You could even create multiple send events for the same trigger and assign multiple different notifications to them. The possibilities are endless!

Available send actions include:

- New user registration
- When a user profile is updated
- When a user role changes
- When a user password is reset
- After a specified amount of time that a user has not logged in
- When a new post is published
- When a there is a new comment
- A specified amount of time after a WooCommerce cart has been abandoned
- When a WooCommerce product is purchased
- A specified amount of time after a WooCommerce purchase
- When a new WooCommerce product is added
- When a WooCommerce subscription is purchased/created


[youtube https://www.youtube.com/watch?v=spGdk3sZlpI]

### CRM

Ultimate WP Mail is a great tool to strengthen your CRM (customer relationship management) toolset. Create an email list, email subscription or newsletter signup. Schedule emails to send at any time and then track the **email statistics** after it is sent. The included templates, as well as the email builder tool, create a responsive email that will look good when opened on any device

### Email Logging

The Ultimate WP Mail plugin also includes a powerful email logging tool. This logs not only the emails sent by the plugin itself, but all emails sent out from your WordPress. This is invaluable for knowing whether or not your messages are getting through and, if not, why. The details included in the log are:

- Email status (e.g. success, failure, failure reason)
- Subject
- Recipient
- Send date
- Output of the email content

We have also included an option to **send a notification to the admin whenever the log detects that an email has failed to send**. You can customize this message with your own content and dynamic template tags that will automatically include pertinent information about the failed email.

### SMTP

We have also included the ability for you to **add in your own SMTP information for email sending**. With this you can send emails from your real email address/server/host. 

WordPress users often find that automatic emails sent from their site fail to get to the recipient. This is usually because they are blocked or flagged as spam. If you have checked the logs and noticed the emails are being sent, but not received, then it's usually a good idea to use the SMTP feature to send emails via your real address. This will greatly reduce the chance of them getting blocked.

The following SMTP info can be entered/customized:

- SMTP host
- Encryption type
- Port number
- Email address authentication

You will also find options that let you **specify the from name and address** for your automatic emails.

### Subscription Interests

The Ultimate WP Mail plugin also comes with the ability for you to let users choose different interests for which they can receive notification updates. This can be added to the user profile page and the user registration form. You can also add it anywhere else on your site using the handy included **Subscription Interests Gutenberg block** or **shortcode**.

Here they can choose from the following interests:

- WooCommerce product categories
- Post categories
- Unique Ultimate WP Mail categories, which you can include in the plugin and utilize for custom emails

If a user has selected any subscription interest, they will automatically receive a notification when that event happens (new product or post is published, etc.).

### Additional Features

Ultimate WP Mail comes with a number of other advanced email sending features that will help you make your email management and email sending as efficient and effective as possible. Additional features include:

- User statistics that show the number of emails opened and links clicked
- Email categories, which can be used in combination with user lists to create well-targeted emails
- Option to automatically include an unsubscribe link in emails
- Styling options to further refine the look of your emails (email background color, email text alignment, email block styling)
- Labelling options, so you can change the text of elements like the subscribe and unsubscribe links as well as the subscription interests form 

The emails created in and by Ultimate WP Mail are all **responsive emails**. If you are looking for a tool that will help you send out mobile emails or help with your mobile CRM setup, this is it. A perfect complement to your current email marketing efforts, you can send a bulk email or mass email to any or all users. And, with the included newsletter signup email widget, you can get new users and email subscribers effortlessly.

Set up WooCommerce reminders and WooCommerce notifications, as well as email reminders for other elements. Create notifications for specific actions and send emails directly to your users. With Ultimate WP Mail, the notification sending possibilities are endless.

### Hooks

You can use the following filters and actions to add your own functions.

Filters:
- ewd_uwpm_title: Parameters are the email's subject and the Params array for that email
- ewd_uwpm_content_pre_substitutions: Parameters are the email's content and the Params array for that email
- ewd_uwpm_content_post_substitutions: Parameters are the email's content and the Params array for that email
- ewd_uwpm_headers: Parameters are the email's headers array and the Params array for that email

Actions:
- ewd_uwpm_email_sent: Parameters are the Params array for that email and the email's unique identifier, if the email was sent to a user
- uwpm_register_custom_element: Used for registering custom email variables, post in the forum if you need help using it!
- uwpm_register_custom_element_section: Used for registering sections for custom email variables

### For help and support

- [FAQs](https://wordpress.org/plugins/ultimate-wp-mail/#faq/)
- [The installation guide](https://wordpress.org/plugins/ultimate-wp-mail/#installation/)
- [The Ultimate WP Mail support forum](https://wordpress.org/support/plugin/ultimate-wp-mail/)
- [Our Support Center](https://www.etoilewebdesign.com/support-center/)

== Installation ==

1. Upload the 'ultimate-wp-mail' folder to the '/wp-content/plugins/' directory
2. Activate the plugin through the 'Plugins' menu in WordPress

or

1. Go to the 'Plugins' menu in WordPress and click 'Add New'
2. Search for 'Ultimate WP Mail' and select 'Install Now'
3. Activate the plugin when prompted

= Getting Started =

1. Create and send an email:
    - To create your own email, first click on 'Email' in the WordPress admin sidebar menu.
    - Then go to the 'Emails' tab and click the 'Add New' button.
    - You will then be presented with our visual email builder, which you can use to add elements, drag and drop elements, etc.
    - At any time, you can use the "Preview Changes" button to see how your email will look.
    - After designing and composing an email, you can use the "Send Email" box on the right to choose your recipient(s) and then send your email (either immediately or scheduled for later).

2. Create an email list:
    - Go to the 'Options' tab and click on the "Lists" area. 
    - Here you can create a new list for email sending and choose specific users to be in that list. 

3. Create automatic sending triggers:
    - Go to the 'Options' tab and click on the "Send Events" area. 
    - Here you will find a lists of available automatic email sending triggers.

4. Customize your email sending experience by making use of the many settings and options available in the "Basic" and "Styling" areas of the "Options" tab.

For a list of specific features, see the Ultimate WP Mail description page here: https://wordpress.org/plugins/ultimate-wp-mail/.

For help and support, please see:

- [FAQs](https://wordpress.org/plugins/ultimate-wp-mail/#faq/)
- [The Ultimate WP Mail support forum](https://wordpress.org/support/plugin/ultimate-wp-mail/)
- [Our Support Center](https://www.etoilewebdesign.com/support-center/)

== Frequently Asked Questions ==

= How do I create an email? =

- To create your own email, first click on 'Email' in the WordPress admin sidebar menu.
- Then go to the 'Emails' tab and click the 'Add New' button.
- You will then be presented with our visual email builder, which you can use to add elements, drag and drop elements, etc.
- At any time, you can use the "Preview Changes" button to see how your email will look.
- After designing and composing an email, you can use the "Send Email" box on the right to choose your recipient(s) and then send your email (either immediately or scheduled for later).

= How do I create an email list? =

Go to the 'Options' tab and click on the "Lists" area. Here you can create a new list for email sending and choose specific users to be in that list. 

= How do I enable automatic sending triggers? =

Go to the 'Options' tab and click on the "Send Events" area. Here you will find a lists of available automatic email sending triggers.

= Can I view statistics about the emails I send? =

You can do this by going to the "User Stats" tab in the plugin admin. Here you'll find user statistics that show the number of emails opened and the number of links clicked.

= Is there a way to add an unsubscribe link to my emails? =

There definitely is. Just set "Add Unsubscribe Link" to "Yes" in the "Basic" area of the "Options" tab.

= How do I send to a subset of WooCommerce users?

When creating or editing an email, in the dropdown list found just above the "Email User List" button, choose "Select a list" and then click the "Email User List" button. In the pane that pops up, click on the "WooCommerce Lists" tab. Here you'll be able to select which past purchasers you want to email. 

= For more help and support =

- [The installation guide](https://wordpress.org/plugins/ultimate-wp-mail/#installation/)
- [The Ultimate WP Mail support forum](https://wordpress.org/support/plugin/ultimate-wp-mail/)
- [Our Support Center](https://www.etoilewebdesign.com/support-center/)

== Changelog ==

= 1.3.12 (2026-05-18) =
- Fixed deprecated notices/code.
- Compatible with WordPress 7.0.

= 1.3.11 (2026-04-22) =
- Added a lot of in-admin help content, including guidance, support, links to applicable documentation and an AI assistant. It works via the AI Admin Assistance plugin (https://wordpress.org/plugins/ait-ai-admin-assistance/).

= 1.3.10 (2025-10-16) =
- Security update/patch for Patchstack report.

= 1.3.9 (2025-10-01) =
- Security update/patch for Patchstack report.

= 1.3.8 (2025-07-30) =
- Fix for deprecated notice sometimes causing an error in newer PHP versions.

= 1.3.7 (2025-07-15) =
- Security update for password reset links.

= 1.3.6 (2025-05-30) =
- Security update - Admin access level/capability required to access email logs.

= 1.3.5 (2025-05-05) =
- Security update. Updated nonce.

= 1.3.4 (2025-04-29) =
- Tested with WordPress 6.8.

= 1.3.3 (2025-03-13) =
- Fixed an issue with incorrect redirecting for link tracking.

= 1.3.2 (2024-11-25) =
- Tested with WordPress 6.7.

= 1.3.1 (2024-07-16) =
- Tested with WordPress 6.6.

= 1.3.0 (2024-07-10) =
- Added new WPForms integration, allowing you to send SMS notifications when a new WPForms submission is received, including the ability to make the SMS notification dependent on a specific input value in the form.

= 1.2.5 (2024-04-04) =
- Tested for compatibility with WP 6.5 and PHP 8.2, and eliminated/fixed deprecated notices associated with this.

= 1.2.4 (2023-11-07) =
- Added a confirmation alert/dialog for the "Email All Users" button.
- Tested for WordPress 6.4 compatibility/support.

= 1.2.3 (2023-08-08) =
- Tested for WordPress 6.3 compatibility/support.

= 1.2.2 (2023-05-11) =
- Updated the WP Background Processing library to correct an issue with duplicate emails being sent to lists.

= 1.2.1 (2023-05-05) =
- Enables additional cross-plugin compatibility.

= 1.2.0 (2023-05-04) =
- Introducing the ultimate version of the plugin.
- With the ultimate version, you can now create and send SMS notifications.
- SMS notifications are available to be used for send events.
- SMS notifications can also be manually sent to a user-created list, an automatically-created list, to an individual user or to all users.
- Added an option to choose whether a send event should go to the user or the admin.
- Added new send event action types for custom post types. 
- Added an option to have a notification sent to the admin if an email fails.
- Added a new 'Force From Email' setting to automatically set the from address to the SMTP username, if SMTP is enabled, to help avoid an SMTP error causing a failed email.
- Fixed an issue causing certain manual emails to automatically-created WooCommerce lists to fail.

= 1.1.3 (2023-03-31) =
- Updated block for compatibility with WordPress 6.2.
- Fixed an issue with lists saving incorrectly, causing an error in PHP 8.
- Fixed warnings in subscription interests output if no specific interests were specified.

= 1.1.2 (2023-01-04) =
- Fixes a potential fatal error on the settings page.

= 1.1.1 (2023-01-03) =
- Update to the settings page to correct an issue that could cause an error to display for checkbox options.

= 1.1.0 (2022-12-12) =
- Added quick links to the admin about page to re-run the walk-through, view tutorial videos and suggest a feature.
- Update to remove a warning that was appearing on WooCommerce category archive pages when there were no products in that category when using the Avada theme.
- Tested with PHP 8.1.

= 1.0.18 (2022-08-31) =
- Fixed an issue causing the labelling option for the Unsubscribe link to not be applied.
- Eliminated a notice related to the logging feature. 

= 1.0.17 (2022-08-23) =
- Added an email logging feature, so you can see whether or not your emails were successfully sent. 
- Added an SMTP feature, so you can route your emails via your external email address/server. 
- Implemented a queue for email sending, to counter issues where you could run into a PHP timeout when trying to send to many users at once.
- Added a new send event for when a new WooCommerce subscription is created.

= 1.0.16 (2022-05-20) =
- Tested with WordPress 6.0.

= 1.0.15 (2022-01-28) =
- Update as part of the fix for the Ultimate Reviews plugin, in which it was not retrieving emails from this plugin.

= 1.0.14 (2022-01-11) =
- Fixed issued causing some emails to not send (correctly) after the last update.
- Fixed issue with emails to specific user lists not sending.

= 1.0.13 (2022-01-07) =
- Updated nonces in the admin.

= 1.0.12 (2021-11-30) =
- Fix for Send Later emails not sending at the scheduled time.

= 1.0.11 (2021-11-05) =
- Fix for the emails sent statistic on the dashboard

= 1.0.10 (2021-11-05) =
- Updates to SAP library version 2.6.1
- Adds in a number of conditional options
- Adds a 'Select All' link to the user list edit screen
- Changes the placeholder when creating a new email post from 'Add Title' to 'Subject'

= 1.0.9 (2021-10-13) =
- Fixes an error that was occurring during link tracking

= 1.0.8 (2021-10-08) =
- Adds the slug that is being replaced to the custom tag replacement parameters
- Removes a potential notice when sending emails to non-users

= 1.0.7 (2021-09-08) =
- Changes to allow third-party plugins to send emails using the plugin
- Update to handle setting the user_id variable for process_email_content more gracefully

= 1.0.6 (2021-08-23) =
- Added an option to choose how often the plugin checks for scheduled send events.
- Fixed an issue causing send event delays to not be calculated correctly.
- Updated an invalid JS variable relating to the tinymce editor.
- Updated a few queries on the settings page due to an issue with meta cache.

= 1.0.5 (2021-08-12) =
- Updated deprecated block_categories.

= 1.0.4 (2021-07-21) =
- Removed Main.php file (no more duplicate plugin entry or false update flag).
- Fixed issue with unsubscribe redirect not working.

= 1.0.3 (2021-07-21) =
- Fixed issue with unsubscribe redirect not working.

= 1.0.2 (2021-06-09) =
- Corrected an issue causing a parse error on activation in some instances.

= 1.0.1 (2021-06-08) =
- <strong>This update includes quite a big change to the construction of the plugin, so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be released).</strong>
- 1.0.1 just includes a version number update to help with the automatic activation after updating.
- Rebuilt the plugin, from the ground up, to be object oriented.
- Updated the structure of the settings pages.
- CSS/styling updates.
- Added a walk-through video that runs on plugin activation to guide users in making an email, creating lists and setting up send events.
- Fixed a few issues with certain send events not triggering.
- Minor updates to the WooCommerce integration to make it more smooth (e.g. only show in UWPM if WC is activated).
- Fix for the opens and clicks statistics not registering. 
- Updates to the conditional enqueuing of assets.
- Cleaning up/removing unnecessary code and files.
- Updated .pot file. (If you have created a translation based on the old version, you might need to update your .po file for this new version.)

= 1.0.0 (2021-06-08) =
- <strong>This update includes quite a big change to the construction of the plugin, so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be released).</strong>
- Rebuilt the plugin, from the ground up, to be object oriented.
- Updated the structure of the settings pages.
- CSS/styling updates.
- Added a walk-through video that runs on plugin activation to guide users in making an email, creating lists and setting up send events.
- Fixed a few issues with certain send events not triggering.
- Minor updates to the WooCommerce integration to make it more smooth (e.g. only show in UWPM if WC is activated).
- Fix for the opens and clicks statistics not registering. 
- Updates to the conditional enqueuing of assets.
- Cleaning up/removing unnecessary code and files.
- Updated .pot file. (If you have created a translation based on the old version, you might need to update your .po file for this new version.)

= 0.25 =
- Fixed an issue with the Product Purchased send event not triggering.
- Fixed an issue with the deletion of sections not saving in email templates.

= 0.24 =
- Fixed issue causing the subject to not be included in emails that are sent to all users.

= 0.23 =
- Corrected an issue causing the "Add Users" to a list function to not work

= 0.22 =
- Corrects recent issue causing the feedback notice to not dismiss correctly

= 0.21 =
- Corrects an issue with the email sending feature integrated into the Ultimate Reviews plugin
- Corrects an issue where every list would have the same name when you opened to edit it

= 0.20 =
- Updating widgets file to remove deprecated create_function

= 0.19 =
- Fixed an issue in which results messages weren't displaying correctly

= 0.18 =
- Added the ability to specify product in abandoned cart
- Corrected issue in which a table was being created in the database without the correct prefix
- Minor changes to post type registration

= 0.17 =
- Updated the review ask pop-up

= 0.16 =
- Corrected issue that was causing the feedback message to pop back up even after a review had been left or feedback sent

= 0.15 =
- Corrected issue that, if you were on WordPress 5.0+ and also using the Classic Editor plugin, could cause the editor on the page and post edit screens to not show.

= 0.14 =
- Corrected issue that was causing the review request to pop back up even after a review had been left or feedback sent

= 0.13 =
- Corrected issue in which emails were not being sent after a WooCommerce product purchase when that send event was being used.

= 0.12 =
- <strong>This is a relatively big update with several new features, corrections, revised admin styling, etc., so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be put out)</strong>
- Added in easy-to-use Gutenberg block for the subscription-interests shortcode
- The Options pages have a brand new and easy-to-use design!
- Added new labelling options
- Added in a new option to specify a redirect URL for when someone unsubscribes
- Reorganized and updated the descriptions for several options to streamline and simplify the admin experience
- Minor styling updates to certain admin screens
- Corrected issue with custom CSS not saving
- Corrected issue with unsubscribe link in email not working
- Corrected issue with pagination on the User Stats screen in the admin
- Added version numbers to enqueued files
- Generated a .pot file (it's in the "lang" folder), which can be used to create translations

= 0.11 =
- Added in the send events that were missing from the options page

= 0.10 =
- Added in the ability to send multiple emails for each event (let us know if you have any issues with emails not sending with the new system!)
- Fixed a number of errors on the dashboard page

= 0.9 =
- Added in options to set a "From" name and email address
- Fixed an error where the background colors wouldn't display in preview mode or test emails
- Fixed an error where the plugin wouldn't work correctly when TinyMCE was in "Text" mode

= 0.8 =
- Added in styling options for the email body and background
- Added in advanced WooCommerce send-on events, to send when a WooCommerce product gets a specific category, or when a specific WooCommerce category or WooCommerce product gets purchased 
- Fixed a couple of small bugs

= 0.7 =
- Added in a number of custom filters and actions for developers to work with
- Added in whole email styling options (email background color, email alignment, email block styling, etc.)
- Fixed an issue where having multiple interest widgets on one page would make them stop working
- Fixed an issue that stopped link click tracking from working if there were multiple URL paramters

= 0.6 =
- Fixed an error with WooCommerce button content replace functions

= 0.5 =
- Added in basic WooCommerce buttons when WooCommerce integration is turned on
- Fixed the broken tracking function

= 0.4 =
- Added options into 3rd party buttons to allow developers to re-use their replace functions

= 0.3 =
- Added attributes to the tags that theme/plugin authors can create in the email editor

= 0.2 =
- Huge update, tonnes of new features

= 0.1 =
- Initial beta version. Please make comments/suggestions in the "Support" forum.