A command-line utility for testing email functionality in Joomla sites. This tool sends a test email using your Joomla's configured email settings, allowing administrators to verify that their email configuration is working correctly.
- ✅ Multi-version support: Compatible with Joomla 3.x, 4.x, and 5.x
- ✅ Native integration: Uses Joomla's built-in email configuration
- ✅ Command-line interface: Perfect for automation and server management
- ✅ Customizable content: Set custom email subject and body
- ✅ Zero configuration: Uses your existing Joomla email settings
- ✅ Multiple mail methods: Supports SMTP, sendmail, PHPMailer, and all Joomla mail options
- PHP 7.4 or newer
- Joomla 3.0 or newer (tested with Joomla 3.x, 4.x, and 5.x)
- CLI environment (command line access)
- Must be run from Joomla root directory
- Download the script
email-test.php
- Upload it to the root directory of your Joomla installation
php email-test.php email-recipient [email-subject] [email-body]
Parameter | Type | Description | Default |
---|---|---|---|
email-recipient |
Required | Email address to send the test email to | - |
email-subject |
Optional | Custom email subject | "Test email from Joomla" |
email-body |
Optional | Custom email body (plain text) | "This is a test email from Joomla." |
Basic usage:
php email-test.php [email protected]
With custom subject:
php email-test.php [email protected] "My Test Subject"
With custom subject and body:
php email-test.php [email protected] "Server Test" "Testing email functionality from production server."
user@server:/var/www/joomla# php email-test.php [email protected]
Detected PHP 8.2.12
Detected Joomla 5.0.3
Email recipient: [email protected]
Email subject: Test email from Joomla
Email body: This is a test email from Joomla.
Email sent. Check the mailbox.
For comprehensive email testing, we recommend using:
- Mail Tester - Tests spam score and deliverability
- MailHog - Local email testing for development
Example with Mail Tester:
php email-test.php [email protected] "Production Test" "Testing from live server"