Every month, sending hundreds of invoices manually is not just tedious—it’s prone to errors. Attachments get mixed up, emails bounce, and tracking who received what becomes a nightmare.
To solve this, we developed the Confluence Invoice Mailer, a custom solution that bridges the gap between our PDF Generator and the member’s inbox.
The Challenge
We verified 301 generated PDF invoices. The next step was distribution. Using a standard email client (like Gmail or Outlook) to send 300+ emails with unique attachments would take hours and likely trigger spam filters.
The Solution: A Custom Plugin
We built a lightweight, purpose-driven WordPress plugin that resides directly in the admin dashboard. It handles the logic of matching files to people and delivering them securely.
🚀 Key Capabilities
- Smart File Matching: Automatically links `CBL_25_26_001.pdf` to the member with Invoice #001.
- Bulk Processing: Queues emails to send in efficient batches, preventing server timeouts.
- SMTP Integration: Uses Hostinger’s secure SMTP (port 465) to ensure high deliverability and avoid the spam folder.
- Real-time Logs: Provides a live dashboard showing success/failure status for every single email.
Under the Hood
The plugin utilizes the PHPMailer library built into WordPress but overrides the default routing to
use an authenticated SMTP connection. This ensures that every “System Generated” invoice looks professional and
arrives reliably.
Combined with our AI Invoice Generator, we have completely automated the billing cycle from CSV upload to Email delivery.