Skip to content

walitoff/joomla-email-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Joomla Badge PHP Badge

Banner

Joomla Email Test CLI Tool

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.

Features

  • 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

Requirements

  • 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

Installation

  1. Download the script email-test.php
  2. Upload it to the root directory of your Joomla installation

Usage

php email-test.php email-recipient [email-subject] [email-body]

Parameters

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."

Examples

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."

Sample Output

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.

Testing Email Deliverability

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"

About

Script to test and verify email sending in Joomla

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages