=== SMTP Form Master ===
Contributors: bitsworld
Donate link: https://upmvc.com/
Tags: smtp, contact form, email, recaptcha, form builder
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 2.0.4
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Contact forms with SMTP, email templates, and reCAPTCHA v3 spam protection.

== Description ==

**SMTP Form Master** is the ultimate WordPress contact form solution that combines powerful SMTP email delivery, professional HTML email templates, intelligent spam protection with Google reCAPTCHA v3, and a flexible form builder - all in one plugin!

= 🚀 Why Choose SMTP Form Master? =

* **Reliable Email Delivery** - Configure custom SMTP servers (Gmail, SendGrid, MailChannels, Amazon SES, etc.) for guaranteed email delivery
* **Professional Email Templates** - Create beautiful HTML emails with customizable templates and dynamic variables
* **Advanced Spam Protection** - Google reCAPTCHA v3 (invisible) protects your forms without annoying CAPTCHAs
* **Flexible Form Builder** - Build any type of form with 8+ field types and custom styling
* **User Confirmations** - Automatically send professional confirmation emails to form submitters
* **Admin Notifications** - Receive formatted email alerts with all submission details
* **No Coding Required** - Beautiful React-powered admin dashboard with intuitive interface
* **Lightweight & Fast** - Only 30KB minified, optimized for performance

= ✨ Key Features =

**SMTP Email Configuration**
* Support for all major SMTP providers (Gmail, Outlook, SendGrid, MailChannels, Amazon SES, etc.)
* Secure authentication with username/password
* SSL/TLS/STARTTLS encryption support
* Test connection feature with detailed debugging
* Password visibility toggle for easy setup
* Compatible with third-party SMTP services

**Advanced Form Builder**
* 8+ field types: Text, Email, Textarea, Number, Checkbox, Radio, Select, Date
* Custom field labels and placeholders
* Required/optional field settings
* Multiple form skins (Default, Modern, Minimal)
* Modal popup forms
* Inline embedded forms
* Responsive and mobile-friendly

**Email Template System (NEW in v2.0!)**
* Professional HTML email templates
* Separate admin and user confirmation templates
* Dynamic template variables: {form_name}, {site_name}, {form_fields}, {user_name}, {user_email}, {submission_date}, {site_url}
* Visual template editor in admin dashboard
* Form fields automatically formatted as beautiful HTML tables
* Enable/disable individual email types
* Reset to default templates anytime
* Full HTML and inline CSS support

**Google reCAPTCHA v3 Protection**
* Invisible spam protection (no user interaction required)
* Score-based filtering (0.0 to 1.0)
* Adjustable sensitivity threshold
* Real-time spam detection
* Privacy policy links included
* Works seamlessly with forms

**User Experience**
* Beautiful success/error messages with styling
* AJAX-ready architecture
* Form validation
* Spam score transparency
* Professional error handling
* Accessibility compliant

= 📋 Perfect For =

* Contact Forms
* Quote Requests
* Support Tickets
* Event Registration
* Newsletter Signups
* Booking Forms
* Feedback Forms
* Application Forms
* Lead Generation
* Customer Inquiries

= 🎯 Template Variables =

Personalize your emails with dynamic content:

* `{form_name}` - The title of your form
* `{form_fields}` - All submitted data in a formatted table
* `{site_name}` - Your website name
* `{site_url}` - Your website URL
* `{submission_date}` - Date and time of submission
* `{user_name}` - Name from the form (user emails only)
* `{user_email}` - Email from the form (user emails only)

== Installation ==

= Automatic Installation =
1. Log in to your WordPress admin panel
2. Navigate to **Plugins → Add New**
3. Search for "SMTP Form Master"
4. Click **Install Now** and then **Activate**

= Manual Installation =
1. Download the plugin ZIP file
2. Log in to your WordPress admin panel
3. Navigate to **Plugins → Add New → Upload Plugin**
4. Choose the ZIP file and click **Install Now**
5. Click **Activate Plugin**

= After Installation =
1. Go to **SMTP Form Master** in your WordPress admin menu
2. Click **SMTP Settings** tab and configure your SMTP server
3. Click **Test Connection** to verify settings
4. (Optional) Go to **reCAPTCHA** tab and add your Google reCAPTCHA v3 keys
5. Go to **Email Templates** tab to customize your emails
6. Go to **Forms** tab to create your first form
7. Copy the shortcode and embed it in any page or post

== Frequently Asked Questions ==

= How do I configure SMTP settings? =
Go to **SMTP Form Master → SMTP Settings** in your WordPress admin. Enter your SMTP server details:
* **Host**: Your SMTP server (e.g., smtp.gmail.com, smtp.sendgrid.net)
* **Port**: Usually 587 for TLS or 465 for SSL
* **Encryption**: Choose TLS (recommended) or SSL
* **Username**: Your email address or SMTP username
* **Password**: Your email password or app-specific password

Click **Test Connection** to verify everything works!

= What SMTP providers are supported? =
SMTP Form Master works with ALL SMTP providers, including:
* Gmail (smtp.gmail.com)
* Outlook/Office365 (smtp.office365.com)
* SendGrid (smtp.sendgrid.net)
* MailChannels (smtp.mailchannels.net)
* Amazon SES
* Mailgun, Postmark, SparkPost, and more!

= How do I get Google reCAPTCHA keys? =
1. Visit https://www.google.com/recaptcha/admin
2. Register your site
3. Choose **reCAPTCHA v3**
4. Copy your Site Key and Secret Key
5. Paste them into **SMTP Form Master → reCAPTCHA** tab
6. Enable reCAPTCHA and save

= How do I create a contact form? =
1. Go to **SMTP Form Master → Forms**
2. Click **Add New Form**
3. Give your form a title
4. Add fields (Name, Email, Message, etc.)
5. Choose a skin style
6. Save the form
7. Copy the shortcode: `[smtpfm_form id="123"]`
8. Paste it into any page or post

= How do I customize email templates? =
1. Go to **SMTP Form Master → Email Templates**
2. Choose **Admin Notification** or **User Confirmation** tab
3. Edit the subject line (use variables like {form_name})
4. Edit the email body (HTML supported)
5. Use template variables: {form_fields}, {user_name}, etc.
6. Enable or disable each email type
7. Click **Save Templates**

= Can I send confirmation emails to users? =
Yes! User confirmation emails are sent automatically when:
* Your form includes an email field
* User Confirmation is enabled in Email Templates
* The user enters a valid email address

= How do I display a form in a modal popup? =
Use the modal parameter in your shortcode:
`[smtpfm_form id="123" modal="yes"]`

= What is the reCAPTCHA threshold? =
The threshold is a score from 0.0 to 1.0:
* **1.0** = Only 100% verified humans (very strict)
* **0.7** = Recommended for high security
* **0.5** = Balanced (default, recommended)
* **0.3** = Lenient
* **0.1** = Very lenient

= Where do submitted forms go? =
Form submissions trigger two emails:
1. **Admin Notification** - Sent to your WordPress admin email
2. **User Confirmation** - Sent to the email address in the form (if enabled)

= Is this plugin GDPR compliant? =
The plugin itself doesn't store personal data. However:
* reCAPTCHA sends data to Google (disclose in privacy policy)
* Email submissions contain user data (handle according to GDPR)
* The plugin includes privacy policy links for reCAPTCHA

= Will this slow down my site? =
No! SMTP Form Master is optimized for performance:
* Only 30KB total size (minified)
* Loads only on pages with forms
* React admin loads only in dashboard
* No jQuery dependency

== Screenshots ==

1. **SMTP Settings Dashboard** - Easy-to-use interface for configuring your SMTP server with test connection feature
2. **Email Templates Editor** - Beautiful React-powered template editor with live preview and template variables
3. **Form Builder** - Intuitive form creator with drag-and-drop field management
4. **reCAPTCHA Settings** - Simple setup for Google reCAPTCHA v3 spam protection
5. **Admin Email Example** - Professional HTML email notifications with formatted form data
6. **User Confirmation Email** - Branded confirmation emails sent to form submitters
7. **Form Frontend Display** - Beautiful, responsive forms with multiple skin options
8. **Modal Form Popup** - Elegant popup forms with smooth animations
9. **Spam Protection Alert** - Transparent spam detection with score display
10. **Mobile Responsive** - Forms look perfect on all devices

== Changelog ==

= 2.0.4 - 2025-10-20 =
**Major Update - Email Templates System**
* **NEW:** Complete email template system with HTML editor
* **NEW:** Separate admin notification and user confirmation templates
* **NEW:** Dynamic template variables ({form_name}, {form_fields}, {site_name}, etc.)
* **NEW:** Visual template editor in React admin dashboard
* **NEW:** Form fields automatically formatted as beautiful HTML tables
* **NEW:** Enable/disable individual email types
* **NEW:** Reset to default templates feature
* **IMPROVED:** Professional email styling with inline CSS
* **IMPROVED:** Better spam detection messaging with score display
* **IMPROVED:** Enhanced success/error messages with styling
* **FIXED:** Critical parse error in shortcode.php
* **FIXED:** Duplicate code cleanup
* **FIXED:** reCAPTCHA verification flow
* **ADDED:** Comprehensive documentation
* **ADDED:** .gitignore for node_modules
* Bundle size: 25.2 KB (was 16.8 KB)

= 2.0.3 - 2025-10-19 =
**reCAPTCHA v3 Integration**
* **NEW:** Google reCAPTCHA v3 spam protection
* **NEW:** Invisible reCAPTCHA (no user interaction)
* **NEW:** Score-based spam filtering (0.0 to 1.0)
* **NEW:** Adjustable threshold settings
* **NEW:** reCAPTCHA badge display
* **NEW:** Privacy policy links
* **IMPROVED:** Form security significantly enhanced
* **ADDED:** reCAPTCHA settings tab in admin

= 2.0.2 - 2025-10-18 =
**SMTP Authentication Fix**
* **FIXED:** MailChannels authentication issues
* **FIXED:** Password visibility after save
* **IMPROVED:** STARTTLS support
* **IMPROVED:** Connection testing with better debugging
* **IMPROVED:** Error messages and troubleshooting

= 2.0.1 - 2025-10-17 =
**React Admin Dashboard**
* **NEW:** Modern React-powered admin interface
* **NEW:** Tabbed navigation (SMTP Settings, Forms, reCAPTCHA)
* **IMPROVED:** Faster, more responsive admin experience
* **IMPROVED:** Better UX with real-time validation
* **OPTIMIZED:** Bundle size and performance

= 2.0.0 - 2025-10-16 =
**Major Rewrite**
* Complete codebase modernization
* React admin dashboard
* Improved security and performance
* Better code organization
* Enhanced debugging capabilities

= 1.0.0 - 2025-10-01 =
* Initial release
* SMTP configuration
* Basic form builder
* Modal support
* Shortcode implementation

== Upgrade Notice ==

= 2.0.4 =
Major update with professional email templates system! Backup your site before updating. All forms and SMTP settings will be preserved. New email templates will use smart defaults.

= 2.0.3 =
Adds powerful Google reCAPTCHA v3 spam protection. Get your reCAPTCHA keys ready at https://www.google.com/recaptcha/admin

= 2.0.0 =
Complete plugin rewrite with modern React admin. Backup recommended before upgrading.

== Configuration Guide ==

= SMTP Setup Examples =

**Gmail**
* Host: smtp.gmail.com
* Port: 587
* Encryption: TLS
* Username: your-email@gmail.com
* Password: [App-specific password](https://support.google.com/accounts/answer/185833)

**SendGrid**
* Host: smtp.sendgrid.net
* Port: 587
* Encryption: TLS
* Username: apikey
* Password: Your SendGrid API Key

**MailChannels**
* Host: smtp.mailchannels.net
* Port: 587
* Encryption: TLS
* Username: Your username
* Password: Your password

**Amazon SES**
* Host: email-smtp.us-east-1.amazonaws.com (adjust region)
* Port: 587
* Encryption: TLS
* Username: Your SMTP username from AWS
* Password: Your SMTP password from AWS

= Template Variable Examples =

**Subject Line:**
```
New inquiry from {user_name} - {form_name}
```
Result: "New inquiry from John Doe - Contact Form"

**Email Body:**
```html
<h2>New Submission from {site_name}</h2>
<p>Form: {form_name}</p>
<p>Date: {submission_date}</p>
{form_fields}
<p>Visit {site_url}</p>
```

= Best Practices =

**Email Templates:**
* Keep subject lines under 50 characters
* Use template variables for personalization
* Test emails on multiple devices
* Include your site name and URL
* Add contact information for support

**reCAPTCHA:**
* Use threshold 0.5 for most sites
* Lower to 0.3 if legitimate users are blocked
* Raise to 0.7 for high-security forms
* Monitor spam score patterns

**Form Design:**
* Keep forms short (5-7 fields max)
* Always include Name and Email fields
* Use clear labels and placeholders
* Mark required fields
* Add a privacy policy link

**SMTP:**
* Always test connection after setup
* Use TLS encryption when available
* Keep credentials secure
* Consider dedicated SMTP service for high volume
* Monitor email delivery rates

== Privacy & GDPR ==

**Data Handling:**
* Form submissions are sent via email only
* No personal data is stored in the database by default
* Admin can control what data is collected in forms

**Third-Party Services:**
* Google reCAPTCHA sends data to Google (disclose in privacy policy)
* SMTP provider receives email data
* No tracking or analytics by this plugin

**Recommendations:**
* Add reCAPTCHA disclosure to your privacy policy
* Inform users about email processing
* Comply with GDPR data handling requirements
* Provide opt-in checkboxes for marketing emails

== Support & Resources ==

**Documentation:**
* Full guides included in plugin folder
* EMAIL_TEMPLATES_GUIDE.md - Complete template documentation
* DEPLOYMENT_READY_v2.0.4.md - Deployment checklist
* HOTFIX_SHORTCODE_ERROR.md - Troubleshooting guide

**Getting Help:**
* Check FAQ section above
* Review included documentation
* Visit https://upmvc.com/ for tutorials
* Contact support through WordPress.org forums

**Feature Requests:**
We're actively developing! Suggest features at our support forum.

**Rate Us:**
If you love SMTP Form Master, please leave a 5-star review!

== Technical Details ==

**Requirements:**
* WordPress 6.0 or higher
* PHP 8.0 or higher
* MySQL 5.6 or higher
* HTTPS recommended (required for reCAPTCHA)

**Performance:**
* Bundle size: 25.2 KB (admin JS) + 4.3 KB (CSS)
* No jQuery dependency
* Optimized React components
* Minimal database queries
* Lazy loading for admin assets

**Browser Support:**
* Chrome/Edge (latest 2 versions)
* Firefox (latest 2 versions)
* Safari (latest 2 versions)
* Mobile browsers (iOS Safari, Chrome)

**Developer Info:**
* Built with React 18
* WordPress REST API integration
* Clean, documented code
* Hook and filter support
* Translation ready

== Credits ==

Developed by [BitsWorld](https://upmvc.com/)
Powered by React and WordPress REST API

== License ==

This plugin is licensed under the GPLv2 or later.
You are free to use, modify, and distribute this plugin.

---

**Thank you for using SMTP Form Master!** 🚀