=== Croms MailPress ===
Contributors: croms
Tags: email, smtp, mail, newsletter, bulk email
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A powerful and flexible email delivery manager for WordPress. Supports multiple SMTP profiles, external SMTP relays, and high-speed API integrations.

== Description ==

**Croms MailPress** is a comprehensive email delivery solution designed to provide flexible, reliable, and high-performance mailing capabilities directly from your WordPress dashboard. Whether you need to send personalized newsletters, transactional emails, or bulk announcements, this plugin ensures your emails reach their destination securely and efficiently.

### Key Features
* **Scheduled Sending:** Easily schedule your emails to be sent at a specific date and time, perfect for newsletters and timed announcements.
* **Recipient Management & CSV Import:** Send emails to manually entered addresses or upload a CSV file with up to 100,000 recipients.
* **Detailed History & Resending:** Track the status of every email sent. View success/error logs and easily retry failed deliveries with a single click.
* **Flexible "FROM" Profiles:** Register and manage multiple sender addresses and their corresponding SMTP server settings. Switch between them seamlessly when composing emails.
* **Opt-out & Bounce Handling:** Manage user subscriptions with a dedicated opt-out list. Manually or automatically classify emails as allowed, paused, hard bounce, soft bounce, or blacklisted.
* **Safe Opt-out Page Customization:** The `[croms_mailpress_optout]` shortcode uses a fixed plugin-controlled template. Administrators can change labels, messages, layout preset, color preset, width, and email visibility without saving arbitrary HTML, CSS, JavaScript, or PHP.
* **Multiple Sending Methods:** Choose between individual SMTP profiles (Account-based), external SMTP Relays, or high-speed API Integrations for massive scale delivery.
* **Bulk Delivery via Cron:** Easily schedule and dispatch large volumes of emails using external Cron jobs. The built-in setup guide helps you configure Cron for both rental servers (e.g., cPanel, XServer) and VPS/Cloud environments.

### Opt-out Page Design Customization
The public opt-out form generated by `[croms_mailpress_optout]` does not provide custom code textareas. This is intentional for WordPress.org review compatibility and user safety. Use the structured settings in **Mail Manager > General Settings** to adjust the heading, explanatory text, button labels, success messages, design preset, color preset, width, and whether the recipient email address is displayed.

For advanced visual customization, add CSS through WordPress core features such as **Appearance > Customize > Additional CSS** or the Site Editor's CSS tools. The fixed template exposes stable classes such as `.croms-mailpress-optout`, `.croms-mailpress-optout__card`, `.croms-mailpress-optout__title`, `.croms-mailpress-optout__notice`, and `.croms-mailpress-optout__button`.

---

### 日本語 (Japanese)

**Croms MailPress** は、WordPressのダッシュボードから直接、柔軟かつ確実なメール配信を行うための総合的なメールマネージャーです。メルマガ配信から一括送信まで、用途に合わせた最適な配信環境を構築できます。

**【主な機能】**
* **日時指定による予約送信:** 特定の日時を指定してメールの配信予約を行うことが可能です。メルマガやキャンペーンのお知らせなど、狙ったタイミングでの自動送信に最適です。
* **CSVインポート対応:** 手動での宛先入力に加え、最大10万件規模のCSVファイルのアップロードによる一括配信に対応しています。
* **詳細な送信履歴と再送機能:** いつ、誰に、どのような結果で送信されたかを一覧で確認可能。エラーになった宛先に対する1クリックでの再送機能も備えています。
* **複数の「FROM（差出人）」管理:** 複数の差出人アドレスとそれぞれのSMTP設定を個別に登録可能。用途に合わせて簡単に使い分けができます。
* **購読管理とバウンス対応:** オプトアウト（配信停止）機能により、ユーザーの購読状況を管理。ハードバウンスやブラックリストなどのステータス管理も可能です。
* **安全なオプトアウトページのカスタマイズ:** `[croms_mailpress_optout]` ショートコードは、プラグイン固定の安全なテンプレートを使用します。管理者は任意のHTML、CSS、JavaScript、PHPを保存することなく、ラベル、メッセージ、レイアウトプリセット、カラープリセット、表示幅、メールアドレス表示の有無を変更できます。
* **選べる3つの送信手法:** 差出人ごとのSMTP送信、外部SMTPリレー、そして高速配信を可能にするAPI連携から、規模に応じた送信手法を選択できます。
* ** Cronによる安定した一括配信:** 外部のCronサーバーを利用し、サーバーに負荷をかけずに大量のメールをバックグラウンドで安定して配信します。レンタルサーバーやVPS向けの分かりやすいセットアップガイドを内包しています。

**【オプトアウトページのデザイン調整】**
`[croms_mailpress_optout]` が出力する公開フォームには、HTML、CSS、JavaScript、PHP を自由入力して保存する設定エリアはありません。WordPress.org の審査基準と安全性を考慮し、プラグイン固定テンプレートと設定項目で調整する仕様です。**メール送信 > 基本設定** から、見出し、説明文、ボタン文言、完了メッセージ、デザインプリセット、カラープリセット、表示幅、メールアドレス表示の有無を変更できます。

より高度な見た目の調整が必要な場合は、プラグイン内に CSS を保存せず、WordPress 標準の **外観 > カスタマイズ > 追加 CSS** またはサイトエディターの CSS 機能をご利用ください。固定テンプレートには `.croms-mailpress-optout`、`.croms-mailpress-optout__card`、`.croms-mailpress-optout__title`、`.croms-mailpress-optout__notice`、`.croms-mailpress-optout__button` などの安定した CSS クラスが付与されます。

== External Services / Third-Party APIs ==

This plugin supports optional delivery through the third-party service `smtp-relay.jp` (Croms SMTP Relay Service).

* **What the service is used for:** The service is used only when the site administrator selects either the **SMTP Relay** delivery method or the **API Integration** delivery method in this plugin. It is also used when the administrator runs the relay/API connection test from the plugin settings screen.
* **What data is sent and when:**
    * **SMTP Relay:** When the SMTP Relay delivery method is selected and an email is sent, the plugin connects to the configured `*.smtp-relay.jp` SMTP server and sends the email for relay delivery. This includes the sender address, recipient address, subject, message body, and any attachments included in the email. When the administrator runs the SMTP relay connection test, the plugin connects to the configured `*.smtp-relay.jp` server to verify connectivity.
    * **API Integration:** When the API delivery method is selected and an email is sent, the plugin sends a JSON request to the configured `https://*.smtp-relay.jp/receive.php` endpoint. This request includes the API key in the request header, the sender name and address, recipient address, subject, HTML message body, and any attachments included in the email. When the administrator runs the API connection test, the plugin sends a test request to the configured API endpoint that includes the API key and uses the site's administrator email address as the sender and recipient for the test payload.
* **Service provider links:** Please review the service terms and privacy policy before using the external delivery methods:
    * Terms of Service: https://wp.croms.jp/smtp-relay-terms/
    * Privacy Policy: https://wp.croms.jp/smtp-relay-privacypolicy/

---

### 日本語 (Japanese)

このプラグインは、外部サービス `smtp-relay.jp`（Croms SMTPリレーサービス）を利用した任意の配信機能をサポートしています。

* **利用目的:** 本サービスは、管理者が本プラグインの送信方法として **SMTPリレー** または **API連携** を選択した場合にのみ利用されます。また、管理画面の接続テスト機能を実行した場合にも利用されます。
* **送信されるデータとタイミング:**
    * **SMTPリレー:** SMTPリレー送信を選択してメールを送信した場合、プラグインは設定された `*.smtp-relay.jp` のSMTPサーバーへ接続し、メール配信を中継します。このとき、送信元メールアドレス、宛先メールアドレス、件名、メール本文、および添付ファイルがある場合はその情報が送信されます。管理者がSMTPリレー接続テストを実行した場合も、設定された `*.smtp-relay.jp` サーバーへ接続して疎通確認を行います。
    * **API連携:** API連携を選択してメールを送信した場合、プラグインは設定された `https://*.smtp-relay.jp/receive.php` エンドポイントへJSONリクエストを送信します。このリクエストには、リクエストヘッダー内のAPIキー、送信元メールアドレス、送信元名、宛先メールアドレス、件名、HTMLメール本文、および添付ファイルがある場合はその情報が含まれます。管理者がAPI接続テストを実行した場合は、APIキーを含むテストリクエストが送信され、テスト用ペイロードの送信元および宛先にはサイト管理者のメールアドレスが使用されます。
* **利用規約とプライバシーポリシー:** 外部配信機能を利用する前に、以下のリンクから内容をご確認ください。
    * 利用規約 (Terms of Service): https://wp.croms.jp/smtp-relay-terms/
    * プライバシーポリシー (Privacy Policy): https://wp.croms.jp/smtp-relay-privacypolicy/

== Installation ==

1. Go to **Plugins > Add New** in your WordPress dashboard.
2. Search for "croms-mailpress" and click **Install Now**, then **Activate** the plugin.
3. Navigate to **Mail Manager > General Settings** to configure your setup.
4. Add your sender profiles under **Mail Manager > FROM Addresses**.
5. Set up your delivery method in **Mail Manager > Send Settings**.
6. Follow the "Cron Setup Guide" in the General Settings to configure your external Cron job for automated background delivery.

---

### 日本語 (Japanese)

1. WordPress管理画面の「プラグイン > 新規追加」を開きます。
2. キーワード検索で「croms-mailpress」と入力し、「今すぐインストール」をクリックしてから有効化します。
3. 左側メニューの「基本設定」を開き、必要な初期設定を行います。
4. 「FROMアドレス」メニューから、使用する送信元アドレスとSMTP情報を登録します。
5. 「送信設定」メニューから、ご用途に合わせた送信手法（個別SMTP、SMTPリレー、API）を選択・保存します。
6. 「基本設定」内の「Cron設定」タブにあるガイドに従い、ご利用のサーバーにCron（定期実行）を設定してください。

== Frequently Asked Questions ==

= Can I use this plugin for free? =
Yes! The plugin itself is fully functional. You can use your own SMTP servers (your web host's SMTP) completely free of charge. For extremely large volumes, you have the option to connect external paid SMTP relay or API services.

= Can I include an opt-out (unsubscribe) link in my emails? =
Yes. You can easily include an opt-out link in your emails. The plugin automatically generates a dedicated unsubscribe page. When a recipient clicks the link, WordPress processes the request and automatically stops future deliveries to that address.

= Can I customize the opt-out page design? =
Yes. You can adjust text labels, messages, layout preset, color preset, width, and email visibility from the plugin settings. The plugin does not store arbitrary custom HTML, CSS, JavaScript, or PHP. For advanced styling, use WordPress core Additional CSS or Site Editor CSS with the documented `.croms-mailpress-optout*` classes.

= Can I personalize emails with user-specific information when sending in bulk? =
Yes. By using the CSV import feature, you can include custom data for each recipient. In addition to the email address, you can specify up to 4 custom fields (such as names or specific text) per recipient and insert them dynamically into your email body.

= Why do I need an external Cron job? =
WordPress's built-in `WP-Cron` relies on website traffic to trigger events, which can be unreliable for bulk email delivery. Using a real server-level Cron job guarantees that your emails are processed consistently and exactly on schedule without slowing down your site for visitors.

---

### 日本語 (Japanese)

= このプラグインは無料で使えますか？ =
はい！プラグインの機能自体は無料で使えます。ご利用中のサーバーのSMTPなどを設定すれば、追加費用なしで運用可能です。もし大規模な配信が必要になった場合は、外部の有料SMTPやAPIサービスと連携することもできます。

= メールの本文内にオプトアウトリンク（購読解除リンク）を挿入できますか？ =
はい、可能です。本プラグインでは専用のオプトアウト（購読解除）ページが自動で作成されます。受信者がメール内のリンクをクリックすると、WordPress側で自動的に処理が行われ、その宛先への今後の配信が自動で停止される仕組みになっています。

= オプトアウトページのデザインは変更できますか？ =
はい。プラグイン設定から、文言、メッセージ、レイアウト、色、表示幅、メールアドレス表示の有無を変更できます。任意の HTML、CSS、JavaScript、PHP をプラグイン内に保存する機能はありません。高度な CSS 調整は、WordPress 標準の追加 CSS またはサイトエディター CSS で `.croms-mailpress-optout*` クラスを指定してください。

= 一斉送信の際、メールの本文に宛先ごとの名前や個別の情報を差し込むことはできますか？ =
はい、可能です。CSVインポート機能を利用することで、メールアドレスに加えて最大4つの個別データ（お名前や固有のテキストなど）を読み込み、メール本文内の任意の場所に自動で差し込んで送信することができます。

= なぜ外部のCron設定が必要なのですか？ =
WordPressに内蔵されている `WP-Cron` はサイトへのアクセスをキッカケとして動作するため、大量のメール配信においては動作が不安定になる可能性があります。サーバーのCronを利用することで、サイトの表示速度に影響を与えることなく、スケジュール通りに確実なバックグラウンド配信が可能になります。

== Screenshots ==

1. **New Email:** Compose new email screen. (新規メール作成画面)
2. **FROM Addresses:** FROM address management screen. (FROMアドレス管理画面)
3. **Send Settings:** Send settings screen. (送信設定画面)

== Changelog ==

= 1.0.0 =
**English:**
* Initial public release.
* Implemented Account-based SMTP, Relay, and API delivery methods.
* Added subscription management and comprehensive delivery history.
* Added Cron setup guide for stable background processing.

**日本語 (Japanese):**
* 最初の公式リリース
* アカウントSMTP、SMTPリレー、API連携による3つの配信メソッドを実装
* 購読状況（オプトアウト）の管理および詳細な送信履歴機能を追加
* 安定したバックグラウンド送信処理のためのCronセットアップガイドを追加
