=== Postalion – Newsletters and Email Subscribers ===
Contributors: agurghis
Tags: newsletter, email marketing, mailing list, subscribers, smtp
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Newsletters from your own WordPress: sign-up forms, lists, templates, background sending, statistics and a log of every email. No limits.

== Description ==

Postalion is a newsletter plugin that runs entirely on your own site. It collects subscribers, sends your newsletters in the background and keeps a record of every email. Your list stays in your WordPress database and the mail goes out through `wp_mail()`, so it uses whatever SMTP plugin or mail service you already have.

There are no limits on subscribers or on how often you send, no account to create, and the plugin makes no requests to outside servers.

= Write =

* Newsletter composer with five email templates: Classic, Letter, Bulletin, Announcement and Card
* Content blocks made for email: headline, button, two columns, image and text, note, divider, spacer, social links
* Personalisation: subscriber name and email, site name and address
* Preview for desktop and phone, and a test email to yourself
* The templates show your site logo, or the site name when there is no logo

= Send =

* Background sending in batches: the first batch goes out at once, the rest through WP-Cron
* Batch size and pause between batches are yours to set (default: 10 emails every 5 seconds)
* Send now, or schedule a date and time
* Live progress, with stop and resume
* An interrupted send continues where it stopped; nobody gets the same email twice

= Grow =

* Sign-up form as a block or a shortcode, with double opt-in
* An optional sign-up popup: appears once per visit, stays away once closed
* Sign-up checkboxes in forms you already have: registration, comments, the WooCommerce checkout, Contact Form 7
* Lists: group subscribers, let each form fill a list, send to the lists you pick
* CSV import and export, into and out of lists
* The users of your site are subscribers too, and can opt out from their profile
* Search, filters and bulk actions

= Automatic emails (optional) =

* A welcome email to people who sign up, once they are confirmed
* New post notification: a published post goes out as a newsletter, to everyone or to chosen lists

= Statistics (optional, off by default) =

* Opens and clicks per newsletter, with the links that were clicked
* Counted on your own site; nothing is sent anywhere else

= Keep track =

* Email log: every email with its recipient, date and result, and a preview of the email as that person received it
* Activity log: sign-ups, confirmations, unsubscribes, imports and sends
* System log for errors and warnings
* Log entries are deleted automatically after a period you choose (90 days by default)

= Respect =

* Unsubscribe link in every email, plus one-click unsubscribe for mail clients that support it (List-Unsubscribe-Post)
* No tracking pixels and no rewritten links unless you turn statistics on
* Supports the WordPress tools for exporting and erasing personal data
* No telemetry and no external requests

= Shortcodes =

* `[postalion_form]` – sign-up form. Attributes: `title`, `description`, `button_text`, `show_name="false"`, `list="slug"`, `class`. In the block editor, use the "Postalion sign-up form" block instead.
* `[postalion_unsubscribe]` – unsubscribe form.
* `[postalion_subscriber_count]` – number of people on your list.

= For developers =

`postalion_subscribe( $email, $args )` subscribes an address from your own code, the way the form does. Filters and actions for add-ons: `postalion_templates`, `postalion_logo_url`, `postalion_newsletter_recipients`, `postalion_email_content`, `postalion_email_sent`, `postalion_subscriber_confirmed`, `postalion_subscriber_subscribed`, `postalion_notify_post`, `postalion_post_newsletter_content`, `postalion_show_popup`, `postalion_admin_menu`.

= Pro =

A Pro add-on is being built for larger lists and more advanced work: a drag-and-drop builder, email sequences, segments by behaviour, A/B testing and WooCommerce automations. The free plugin is complete on its own and has no limits to remove. More at [postalion.fantasythemes.net](https://postalion.fantasythemes.net).

== Installation ==

1. Install Postalion from the Plugins screen, or upload the `postalion` folder to `/wp-content/plugins/`.
2. Activate it.
3. Open **Postalion → Settings**, check the sender name and address, and send yourself a test email.
4. Put `[postalion_form]` on a page so visitors can sign up, or import your list under **Postalion → Subscribers**.
5. Write your first newsletter under **Postalion → Newsletters**.

For reliable delivery, connect an SMTP plugin (WP Mail SMTP, FluentSMTP, Post SMTP) to a mail service. Postalion uses it automatically.

== Frequently Asked Questions ==

= How are the emails sent? =

Through the standard `wp_mail()` function. On most hosts that works for a small list. For reliable delivery use an SMTP plugin connected to a mail service such as Amazon SES, Mailgun, Postmark or Brevo; the mail servers of shared hosting are often blocklisted.

= How many emails can I send? =

As many as your host or mail service allows. Postalion does not count. Set the batch size and the pause between batches under **Postalion → Settings** to stay inside their limits.

= Do I need a cron job? =

No. Sending runs on WP-Cron, which WordPress triggers when someone visits the site. On a site with very little traffic, a real cron job for `wp-cron.php` keeps batches and scheduled newsletters on time.

= What happens when someone clicks the unsubscribe link? =

They see a short page asking them to confirm, and one click on the button unsubscribes them. The link itself does not unsubscribe, so mail scanners that open links cannot remove people by accident. Mail clients with a built-in unsubscribe button unsubscribe at once.

= Does it help with GDPR? =

It gives you the tools: double opt-in (on by default), an unsubscribe link in every email, support for the WordPress personal data export and erase requests, and automatic deletion of old log entries. Statistics are off by default; when you turn them on, opens and clicks are counted on your own site and the privacy policy guide tells you what to mention. No data leaves your site except the emails you send. What you send, and to whom, remains your responsibility.

= Can I import my existing subscribers? =

Yes. Go to **Postalion → Subscribers → Import CSV**. The file needs an email column; first name and last name are optional. Addresses already on the list are skipped, and people who unsubscribed stay unsubscribed. Only import people who agreed to receive email from you.

= Can I change the look of the sign-up form? =

The form takes the font of your theme. Three CSS custom properties change the rest: `--postalion-accent`, `--postalion-accent-text` and `--postalion-radius`, set on `.postalion-subscription-form`.

= Can I add my own email template? =

Yes, with the `postalion_templates` filter: register a name, a description and the path to an HTML file that contains `{content}`.

= Is it translation ready? =

Yes. Every text in the plugin, including the footer of the emails, can be translated.

= Can I have more than one list? =

Yes. Create lists under **Postalion → Lists**. Each sign-up form, block or checkbox can fill a particular list, and when you write a newsletter you choose everyone, some lists or only the users of the site. Unsubscribing always covers every list.

= Where is the data stored, and how do I remove it? =

In nine tables in your WordPress database. Deleting the plugin keeps the data unless you turn on **Delete all data when the plugin is deleted** under Settings.

== Screenshots ==

1. Postalion in one picture: the dashboard and an email on a phone. Forms, templates, background sending and a log of every email, all inside your WordPress.
2. The composer: subject, template, and the send and schedule controls.
3. The editor with content blocks and personalisation.
4. Preview of a newsletter before it goes out.
5. Subscribers, with their lists, status, filters and bulk actions.
6. A send in progress.
7. The email log, with a preview of every email.
8. The five email templates.
9. Settings: sender, double opt-in, sending speed, automatic emails and statistics.
10. The sign-up form on a page of the site.
11. Lists: groups of subscribers, each with its own sign-up shortcode.
12. The report of a newsletter: opens, clicks and the links that were clicked.

== Changelog ==

= 1.1.0 =
* Lists: group subscribers, fill a list from a form, send to chosen lists or to site users only.
* Statistics, off by default: opens and clicks per newsletter, with the links clicked, counted on your own site.
* Welcome email and new post notification, both optional.
* The sign-up form as a block, with a live preview in the editor.
* An optional sign-up popup.
* Sign-up checkboxes for the registration form, comments, the WooCommerce checkout and Contact Form 7.
* `postalion_subscribe()` for developers; new filters for the popup and the post notification.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.1.0 =
Statistics, the welcome email and the new-post notification are off until you turn them on under Postalion → Settings. The database upgrades itself the first time you open the admin.

= 1.0.0 =
First release.
