Guide to sending mass emails to customers, affiliates, and newsletter subscribers in OpenCart 4
Reach Your Audience The Mail feature allows you to send mass emails to different customer segments, affiliates, and newsletter subscribers directly from your OpenCart 4 admin panel.
Introduction
The Mail feature in OpenCart 4 enables you to send targeted email campaigns to various segments of your audience. This powerful tool is ideal for marketing campaigns, announcements, promotions, and customer communication. With flexible recipient options and an integrated WYSIWYG editor, you can create professional emails without leaving your admin dashboard.
Accessing the Mail Interface
To access the Mail feature:
Log in to your OpenCart admin panel
Navigate to Marketing → Mail
You'll see the email composition interface with all available options

Sending a Mass Email
Step 1: Configure Sender Settings
Select the From store that will appear as the sender of the email:
Default: Uses your main store configuration
Specific Store: Select from your multi-store setup (if enabled)
This determines which store's email address and name will be used as the sender.
Step 2: Select Recipients
Choose who will receive your email from the To dropdown:
All Newsletter Subscribers
Customers who have subscribed to your newsletter
Newsletter campaigns, general announcements
All Customers
Every customer in your database
Store-wide announcements, policy changes
Customer Group
Customers belonging to a specific group
Targeted promotions (e.g., wholesale customers)
Customers
Individual customers selected manually
VIP communications, specific customer follow-ups
All Affiliates
Every affiliate in your system
Affiliate program updates, commission announcements
Affiliates
Individual affiliates selected manually
Specific affiliate communications
Products
Customers who have purchased specific products
Product-specific promotions, update notifications
When selecting Customer Group, choose the specific group from the dropdown that appears.
When selecting Customers, Affiliates, or Products, use the autocomplete field to search and add specific recipients.
Step 3: Compose Your Email
Fill in the email composition form:
Subject (Required)
Enter a clear, descriptive subject line
Keep it concise but informative
Avoid spam trigger words
Message (Required)
Use the WYSIWYG editor (CKEditor) to format your email
Supports HTML formatting, images, links, and styling
Create engaging content with proper formatting
Step 4: Send the Email
Click the Send button to start the mailing process:
Emails are sent in batches of 10 recipients at a time
You'll see progress updates as emails are sent
A success message confirms completion
If interrupted, you can resume from where it left off
Recipient Options Details
All Newsletter Subscribers
Target: Customers who have opted in to receive newsletters
Best for: Regular newsletter campaigns, general store updates
Considerations: Ensure compliance with anti-spam regulations
All Customers
Target: Every customer in your database with an email address
Best for: Important store-wide announcements
Considerations: Use sparingly to avoid overwhelming customers
Customer Group
Target: Customers belonging to a specific customer group
Best for: Targeted promotions (retail vs wholesale, geographic segments)
Configuration: Select the desired group from the dropdown
Integration: Works with your existing customer group structure
Individual Customers
Target: Specific customers selected via autocomplete
Best for: Personalized communications, VIP treatment
Selection: Type customer name to search and add
Management: Added customers appear in a list that can be edited
All Affiliates
Target: Every affiliate in your affiliate program
Best for: Affiliate program updates, commission changes
Considerations: Keep affiliates informed about program changes
Individual Affiliates
Target: Specific affiliates selected via autocomplete
Best for: Direct communication with top performers
Selection: Type affiliate name to search and add
Product-Based Targeting
Target: Customers who have purchased specific products
Best for: Product updates, accessory promotions, follow-up offers
Selection: Type product name to search and add
Logic: Only customers who have ordered the selected products will receive the email
Email Configuration
Sender Configuration
The From setting determines which store's identity is used:
Email Address: Taken from the store's configuration (System → Settings → Store tab)
Sender Name: Uses the store name from the selected store
Multi-store Support: Each store can have different sender information
Email Content
WYSIWYG Editor: Full-featured CKEditor for HTML email creation
HTML Support: Create richly formatted emails with images and links
Plain Text Fallback: System generates plain text version automatically
Character Encoding: UTF-8 support for international characters
Sending Process
Batch Size: 10 emails per batch to prevent server overload
Progress Tracking: Real-time updates during sending
Resume Capability: Can resume if process is interrupted
Error Handling: Invalid emails are skipped, valid ones continue
System Requirements
Email System Configuration
Before using the Mail feature, ensure your email system is properly configured in System → Settings → Server tab:
Mail Engine
Method for sending emails
mail (PHP mail()) or smtp
SMTP Hostname
SMTP server address
Your email provider's SMTP server
SMTP Username
SMTP authentication username
Your email address
SMTP Password
SMTP authentication password
Your email password
SMTP Port
SMTP server port
587 (TLS) or 465 (SSL)
SMTP Timeout
Connection timeout in seconds
30
Note: For reliable mass email delivery, consider using SMTP with a professional email service.
Server Requirements
PHP mail() Function: Must be enabled and configured on your server
SMTP Support: Required if using SMTP mail engine
Execution Time: Sufficient PHP execution time for large batches
Memory Limit: Adequate PHP memory for processing emails
Use Cases for Mass Emails
1. Newsletter Campaigns 📰
Send regular newsletters to subscribers:
Monthly product updates
Seasonal promotions
Company news and announcements
Educational content related to your products
2. Product Promotions 🛍️
Target customers based on purchase history:
Cross-sell accessories for purchased products
Notify about product restocks
Announce new versions or updates
Special offers on related products
3. Customer Segmentation 🎯
Send different messages to different customer groups:
VIP discounts for loyal customers
Wholesale pricing announcements for business customers
Geographic-specific promotions
New customer welcome series
4. Affiliate Communication 🤝
Keep your affiliate network informed:
New affiliate program features
Commission structure updates
Marketing material announcements
Performance reports and tips
5. System Notifications 🔔
Important store announcements:
Policy changes (shipping, returns, privacy)
Holiday schedules
System maintenance notices
Security updates
Best Practices
Email Strategy 📧
Segment Your Audience: Use customer groups and purchase history for targeted messaging
Clear Subject Lines: Be descriptive but concise to improve open rates
Mobile-Friendly Design: Ensure emails look good on mobile devices
Call to Action: Include clear next steps for recipients
Test Before Sending: Send test emails to yourself first
Compliance & Delivery ⚠️
Permission-Based: Only email customers who have opted in (especially for newsletters)
Unsubscribe Option: Include unsubscribe instructions in every email
Anti-Spam Laws: Comply with regulations like CAN-SPAM, GDPR, CASL
Sender Reputation: Maintain good email practices to avoid being marked as spam
List Hygiene: Regularly clean inactive or bouncing email addresses
Technical Considerations ⚡
Batch Size: The system sends 10 emails at a time - be patient with large lists
SMTP Recommended: For reliable delivery, use SMTP instead of PHP mail()
Email Templates: Consider creating reusable templates for common communications
Testing: Always test with a small group before sending to everyone
Timing: Schedule sends for optimal open times (varies by audience)
Troubleshooting
Common Issues
Emails not sending 🚫
Solution: Check your email configuration in System → Settings → Server tab:
Verify Mail Engine is set correctly
Check SMTP credentials if using SMTP
Test with a single recipient first
Check server error logs for mail function errors
Emails going to spam 📭
Solution: Improve email deliverability:
Use a recognizable "From" name and address
Avoid spam trigger words in subject and content
Include unsubscribe instructions
Ensure your server's IP isn't on blacklists
Consider using a dedicated email service
Slow sending process 🐢
Solution: The system sends 10 emails per batch for server stability:
Be patient with large recipient lists
Check server performance and resources
Consider sending during off-peak hours
Break large campaigns into smaller segments
Missing recipient options 🔍
Solution: Some options require data to be available:
Customer Groups: Ensure you have created customer groups first
Products: Products must have been purchased by customers
Newsletter Subscribers: Customers must have opted in to newsletters
Affiliates: Affiliate program must be enabled and have affiliates
Formatting issues in emails 🎨
Solution: Check your HTML email formatting:
Use the WYSIWYG editor's formatting tools
Test in multiple email clients
Keep designs simple and responsive
Avoid complex CSS that may not render consistently
Performance Considerations ⚡
Large recipient lists will take time to process (10 emails per batch)
Server resources affect sending speed
Consider using cron jobs for very large campaigns (requires customization)
Monitor server load during mass email sends
Documentation Summary 📋
You've now learned how to:
Access and use the Mail feature in OpenCart 4
Select different recipient types for targeted campaigns
Compose professional emails using the WYSIWYG editor
Configure email settings for optimal delivery
Apply best practices for effective email marketing
Troubleshoot common email sending issues
Next Steps:
Marketing Overview - Explore other marketing features
Affiliate Management - Set up and manage your affiliate program
Coupon Management - Create and distribute discount coupons
Customer Groups - Organize customers for better targeting
System Settings - Configure email and other system settings
Last updated