# 📦 SMTP Form Master v2.0.0 - Ready to Upload

This folder contains **ONLY** the files needed for WordPress installation.

---

## ✅ What's Included

```
upload/
├── smtp-form-master.php       ← Main plugin file
├── readme.txt                 ← Plugin readme
├── admin/
│   ├── build/                 ← ⭐ Compiled React admin (REQUIRED!)
│   │   ├── index.js           (16.6 KB)
│   │   ├── index.css          (4.26 KB)
│   │   └── index.asset.php    (149 bytes)
│   ├── dashboard.php          ← Admin page loader
│   ├── css/                   ← Admin styles
│   └── js/                    ← Admin scripts
├── includes/                  ← PHP classes
│   ├── smtp-config.php
│   ├── form-builder.php
│   ├── shortcode.php
│   └── class-rest-api.php
└── public/                    ← Frontend assets
    ├── css/
    └── js/
```

**Total Size:** ~107 KB (no node_modules!)

---

## 🚀 Installation Methods

### Method 1: Direct Copy to WordPress

**Copy entire upload folder to WordPress plugins:**

```powershell
# Windows PowerShell
Copy-Item -Path "d:\GitHub\worpressPlugins\smtp-plugin\v2.0.0\upload\*" -Destination "C:\xampp\htdocs\yoursite\wp-content\plugins\smtp-form-master" -Recurse -Force
```

```bash
# Linux/Mac
cp -r upload/* /var/www/html/wp-content/plugins/smtp-form-master/
```

---

### Method 2: Create ZIP for WordPress Upload

**Create a ZIP file:**

```powershell
# Windows PowerShell
Compress-Archive -Path "d:\GitHub\worpressPlugins\smtp-plugin\v2.0.0\upload\*" -DestinationPath "d:\smtp-form-master.zip" -Force
```

**Then in WordPress:**
1. Go to **Plugins** → **Add New** → **Upload Plugin**
2. Choose `smtp-form-master.zip`
3. Click **Install Now**
4. Click **Activate**

---

### Method 3: FTP Upload

**Upload via FTP/SFTP:**

1. Connect to your server
2. Navigate to: `/wp-content/plugins/`
3. Create folder: `smtp-form-master`
4. Upload all files from this `upload/` folder

---

## ✅ Verification

After uploading, verify these files exist on your server:

- ✅ `smtp-form-master/smtp-form-master.php`
- ✅ `smtp-form-master/admin/build/index.js`
- ✅ `smtp-form-master/admin/build/index.css`
- ✅ `smtp-form-master/admin/dashboard.php`
- ✅ `smtp-form-master/includes/class-rest-api.php`

---

## 🎯 After Installation

1. **Activate Plugin:**
   - Go to **Plugins** → **Installed Plugins**
   - Find "SMTP Form Master"
   - Should show **Version 2.0.0**
   - Click **Activate**

2. **Access React Dashboard:**
   - Click **SMTP Form Master** in WordPress admin menu
   - You'll see 3 tabs:
     - **SMTP Settings** - Configure email settings
     - **Forms** - Manage forms
     - **reCAPTCHA** - Configure Google reCAPTCHA v3

3. **Configure SMTP:**
   - Enter your SMTP settings
   - Click **Test Connection** to verify
   - Save settings

---

## 📊 What's NOT Included (and why)

❌ **node_modules/** - Development dependencies (200MB) - NOT needed!  
❌ **admin/src/** - React source files - Already compiled to build/  
❌ **package.json** - npm config - NOT needed in production  
❌ **build.bat, deploy.ps1** - Build scripts - Local development only  
❌ **.md files** - Documentation - Optional  

**The compiled build files already contain everything needed!**

---

## 🔍 File Purposes

| File/Folder | Purpose |
|-------------|---------|
| `smtp-form-master.php` | Main plugin file, registers hooks |
| `admin/build/index.js` | Compiled React admin bundle |
| `admin/build/index.css` | Compiled admin styles |
| `admin/dashboard.php` | Loads React admin in WordPress |
| `includes/class-rest-api.php` | REST API for React communication |
| `includes/smtp-config.php` | SMTP configuration handler |
| `includes/form-builder.php` | Form builder functionality |
| `includes/shortcode.php` | Form shortcode handler |
| `public/css/` | Frontend form styles |
| `public/js/` | Frontend form scripts |

---

## 🎉 Success Indicators

After activation, you should see:

✅ Plugin version shows **2.0.0** in plugins list  
✅ "SMTP Form Master" menu in WordPress admin sidebar  
✅ NO "Forms" submenu (it's inside React dashboard now)  
✅ Modern React dashboard with 3 tabs  
✅ Password fields with eye icon (👁)  
✅ Test Connection button  
✅ No JavaScript errors in browser console (F12)  

---

## 🐛 Troubleshooting

### Blank page in admin?
- Clear browser cache (Ctrl + Shift + Delete)
- Hard refresh (Ctrl + F5)
- Check: Does `admin/build/index.js` exist?

### Plugin won't activate?
- Check PHP version: Requires PHP 8.0+
- Check WordPress version: Requires WordPress 6.0+
- Enable WP_DEBUG to see errors

### React admin not loading?
- Open browser console (F12)
- Look for JavaScript errors
- Verify `admin/build/` files uploaded correctly

---

## 📞 Need Help?

If you encounter issues:
1. Enable WordPress debug mode
2. Check browser console for errors
3. Verify all files uploaded correctly
4. Check server error logs

---

**This folder is ready to upload to WordPress!** 🚀

Just copy everything to: `wp-content/plugins/smtp-form-master/`
