=== 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.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Newsletters from your own WordPress: forms, lists, templates, automatic emails, built-in SMTP and statistics. No limits, no monthly bill.

== Description ==

Postalion is a complete newsletter plugin that runs on your own site. People sign up through a form, a block, a popup or a box in the forms you already use. You write in a composer made for email. Postalion sends in the background, a batch at a time, and keeps a record of every email. Your list stays in your WordPress database.

All of it is free: no limit on subscribers or sends, no account to create, no logo in your emails and no requests to outside servers. Try it with the **Live Preview** button above.

= Why Postalion =

* **No limits.** Unlimited subscribers, lists and sends, in the free plugin.
* **Your list stays yours.** Subscribers live in your own database; nothing is sent to us or to anyone else.
* **Mail that arrives.** SMTP built in, with a test button, or any mail plugin you already use.
* **Grows with you.** Lists, automatic emails, a digest of new posts, open and click statistics and a public archive.
* **Looked after.** Tested before every release and improved every few weeks; see the changelog.

= 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
* A web version of every newsletter ("View in browser") and a public archive of the ones you sent
* 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

= Mail server (optional) =

Out of the box the emails go through the mail function of WordPress, so whatever your host or your mail plugin set up keeps working. If nothing is set up, enter an SMTP server under Settings: your own, or a sending service such as Brevo, Amazon SES, Mailgun, Postmark or SendGrid. A button tries the settings before you save them, the password is stored encrypted, and a switch can route all the mail of the site through the same server. No second plugin needed.

= 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, WPForms, Fluent Forms and Elementor Pro forms (beta)
* Lists: group subscribers, let each form fill a list, send to the lists you pick
* CSV import and export, into and out of lists
* Import from MailPoet: people, lists and statuses come over in one go
* 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
* Digest of new posts: daily, weekly or monthly, at the hour you choose, only when there is something new

= 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.
* `[postalion_archive]` – the newsletters you sent, each with its web version. Attributes: `limit`, `lists="slug"`.

= 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_digest_include_post`, `postalion_digest_content`, `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. The Postalion dashboard opens. Its first step sends you a test email; check the sender name and address under **Postalion → Settings**.
4. Add the Postalion sign-up block (or `[postalion_form]`) to a page so visitors can sign up, or import your list under **Postalion → Subscribers** or from MailPoet.
5. Write your first newsletter under **Postalion → Newsletters**.

For reliable delivery, enter an SMTP server or a sending service under **Postalion → Settings → Sending method** and press "Send test". If you already use a mail plugin (WP Mail SMTP, FluentSMTP, Post SMTP), keep it: Postalion goes through it automatically.

== Frequently Asked Questions ==

= How are the emails sent? =

Through the standard `wp_mail()` function, or through an SMTP server you enter under Settings → Sending method. On most hosts the mail function works for a small list; for reliable delivery use a sending service such as Brevo, Amazon SES, Mailgun or Postmark, since the mail servers of shared hosting are often blocklisted. A mail plugin you already have keeps working: Postalion goes through it.

= 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. From a CSV file, under **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.

Coming from MailPoet? If it is installed on the same site, **Postalion → Settings → Import from MailPoet** brings its subscribers over with their names, lists, statuses and sign-up dates, in one go. Nothing in MailPoet is changed, so you can compare the two before removing it. 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.
2. The dashboard: who is on the list, what went out, what is scheduled, and the first steps.
3. The composer: subject, template, audience, and the send and schedule controls.
4. The editor with content blocks made for email.
5. Preview of a newsletter before it goes out, on desktop and phone.
6. Subscribers, with their lists, status, filters and bulk actions.
7. Lists: groups of subscribers, each with its own sign-up form.
8. Automatic emails: a welcome email, new-post notifications and a weekly digest of new posts.
9. Settings: the sender, an SMTP server with a test button, and the import from MailPoet.
10. The sign-up form on a page of the site.
11. The report of a newsletter: opens, clicks and the links that were clicked.
12. The web version of a newsletter, opened from "View in browser".
13. A send in progress, batch by batch.
14. The email log, with a preview of every email.
15. The five email templates.

== Changelog ==

= 1.3.0 =
* Sign-up checkboxes for WPForms and Fluent Forms, and for Elementor Pro forms (beta): a ticked box subscribes the address from the form, with double opt-in if it is on.
* Web version of every newsletter: a "View in browser" link in the footer opens it on your site, addressed to "there" and counting nothing. It can be turned off in Settings.
* Public archive: the [postalion_archive] shortcode lists the newsletters sent to everyone (or to the lists you name), newest first.
* Digest of new posts: every day, week or month, at the hour you choose, the posts published since the last digest go out as one newsletter, to everyone or to chosen lists. Nothing is sent when there is nothing new. A button sends you a test digest first.

= 1.2.2 =
* Fix: some unsubscribe links answered "This link does not work" (site users with a one-digit ID, subscribers with ID 1–9 or 1000–9999, and some addresses). The links now work, including the ones in emails that already went out.
* Someone who unsubscribes while a newsletter is still going out no longer gets it from the batches that follow.

= 1.2.1 =
* A note on the dashboard asks for a review on WordPress.org once the first newsletter has gone out. It appears only on Postalion's screens, and one answer makes it go away.

= 1.2.0 =
* Sending method: an SMTP server or a sending service can be set up in Settings, with a test button that tries the values before they are saved; the password is stored encrypted. Optionally the same server carries all the mail of the site.
* Import from MailPoet: subscribers, lists, statuses and sign-up dates come over in batches, without changing anything in MailPoet.
* After activation the dashboard opens and the first step sends the test email right there.
* The dashboard shows the sending method and links to the 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.3.0 =
New and off until you turn them on: a digest of new posts, and sign-up boxes for WPForms, Fluent Forms and Elementor Pro forms. Newsletters now carry a "View in browser" link; it can be turned off under Settings → Web version and archive.

= 1.2.2 =
Important fix: some unsubscribe links did not work. Update so every reader can leave with one click, including from emails you already sent.

= 1.2.0 =
Nothing changes until you touch it: Settings gets a Sending method card (an SMTP server with a test button) and, when MailPoet is on the site, an import from it.

= 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.
