=== SMSTunnel for CF7 ===
Contributors: narcisbodea, nicunarcisbodea
Tags: contact form 7, sms, notifications, cf7, sms notifications
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send SMS notifications when Contact Form 7 forms are submitted. Adds an SMS tab to CF7 editor similar to the Mail tab.

== Description ==

**SMSTunnel for CF7** extends Contact Form 7 with SMS notification capabilities. When a visitor submits a form, you can automatically send an SMS to yourself, your team, or even the form submitter.

= Requires SMSTunnel Plugin =

This addon requires the main [SMSTunnel](https://wordpress.org/plugins/smstunnel/) plugin to be installed and configured first.

= Key Features =

* **SMS Tab in CF7 Editor** - Configure SMS notifications just like you configure email notifications
* **Use Form Tags** - Include any form field in your SMS using CF7 mail-tags like [your-name], [your-email], [your-phone]
* **Multiple Recipients** - Send SMS to multiple phone numbers
* **Conditional Sending** - Choose when to send SMS (on success, on mail failure, always)
* **Admin Notifications** - Get instant SMS alerts when forms are submitted
* **Customer Notifications** - Send confirmation SMS to form submitters

= How It Works =

1. Install and activate SMSTunnel main plugin
2. Install and activate SMSTunnel CF7
3. Edit any Contact Form 7 form
4. Go to the new "SMS" tab
5. Configure recipient phone number and message template
6. Use mail-tags like [your-name] to personalize messages

= Example SMS Template =

`New contact from [your-name]
Phone: [your-phone]
Message: [your-message]`

= Supported Mail-Tags =

All Contact Form 7 mail-tags are supported:

* `[your-name]` - Submitter's name
* `[your-email]` - Submitter's email
* `[your-phone]` - Submitter's phone
* `[your-message]` - Message content
* `[_date]` - Submission date
* `[_time]` - Submission time
* `[_remote_ip]` - Submitter's IP address
* Any custom field tags you define

== Installation ==

= Requirements =

* WordPress 5.0 or higher
* PHP 7.4 or higher
* Contact Form 7 plugin (active)
* SMSTunnel plugin (active and configured)

= Automatic Installation =

1. Ensure SMSTunnel main plugin is installed and connected
2. Ensure Contact Form 7 is installed and active
3. Go to Plugins > Add New
4. Search for "SMSTunnel CF7"
5. Click "Install Now" and then "Activate"

= Manual Installation =

1. Download the plugin zip file
2. Go to Plugins > Add New > Upload Plugin
3. Upload the zip file and click "Install Now"
4. Activate the plugin

= Configuration =

1. Go to Contact > Contact Forms
2. Edit any form
3. Click on the "SMS" tab
4. Enable SMS notifications
5. Enter the recipient phone number (with country code, e.g., +40712345678)
6. Write your message template using mail-tags
7. Save the form

== External Services ==

This plugin relies on the [SMSTunnel](https://wordpress.org/plugins/smstunnel/) plugin to send SMS notifications. When a Contact Form 7 form is submitted, the following data may be transmitted to the SMSTunnel service and your paired Android device:

* Form field values included in the SMS template (name, email, phone, message, etc.)
* Submission metadata if used in the template (IP address via [_remote_ip], date, time)

Data is sent only when SMS notifications are enabled for a specific form. The SMS is relayed through the SMSTunnel server to your own Android phone, which sends it as a standard SMS message.

* **Service provider**: SMSTunnel.io (NARBOWEB SRL)
* **Service URL**: https://smstunnel.io
* **Privacy Policy**: https://smstunnel.io/privacy
* **Terms of Service**: https://smstunnel.io/terms

== Frequently Asked Questions ==

= Do I need the main SMSTunnel plugin? =

Yes, this addon requires the SMSTunnel main plugin to be installed and configured with your Android phone.

= Can I send SMS to the person who submitted the form? =

Yes! Use a phone field in your form (e.g., [your-phone]) and set that as the recipient in the SMS tab.

= Can I use form field values in the SMS? =

Yes, use Contact Form 7 mail-tags like [your-name], [your-phone], [your-message], etc.

= What phone number format should I use? =

Use international format with country code, for example: +40712345678, +1555123456

= Can I send to multiple phone numbers? =

Yes, separate multiple numbers with commas: +40712345678, +40723456789

= When is the SMS sent? =

You can configure this in the SMS tab:
* On successful submission (default)
* When mail fails to send
* Always (regardless of mail status)

= Is there a character limit for SMS? =

Standard SMS is 160 characters. Longer messages will be split into multiple SMS segments by your carrier.

== Screenshots ==

1. SMS tab in Contact Form 7 editor
2. SMS notification settings
3. Message template with mail-tags
4. SMS received on phone

== Changelog ==

= 1.2.0 =
* Added SMS (2) autoresponder - send confirmation SMS to form submitters
* SMS success message shown to user even when email delivery fails
* Added permission check (manage_options) on SMS settings save
* Added External Services disclosure for WordPress.org compliance
* Fixed uninstall cleanup to delete correct meta keys
* Added load_plugin_textdomain for proper internationalization
* Regenerated translation template (.pot file)

= 1.1.0 =
* Added support for all CF7 mail-tags
* Improved error handling
* Added multiple recipient support
* Better integration with SMSTunnel API

= 1.0.0 =
* Initial release
* SMS tab in CF7 editor
* Basic mail-tag support
* Admin notifications

== Upgrade Notice ==

= 1.1.0 =
Improved mail-tag support and multiple recipients. Requires SMSTunnel main plugin.

= 1.0.0 =
Initial release of SMSTunnel CF7.
