Application Manual: Email Campaign Manager
Overview
This application automates sending personalized email campaigns to your client base. It leverages PHPMailer for email delivery and tcPDF for generating PDF attachments.
Prerequisites
Web Server: PHP-enabled web server (e.g., Apache, Nginx)
Database: MySQL or MariaDB database with campanas (campaign details) and baseenvio (client list) tables.
PHP: PHP 7.2 or higher
Composer: Dependency manager for PHP
Installation
Clone/Upload Code: Place the application code in your web server's document root.
Install Dependencies:
Bash
composer require phpmailer/phpmailer
composer require tecnickcom/tcpdf
 This will install PHPMailer and tcPDF libraries.
Configuration:
Open the configuration file (config.php).
Update database credentials ($db_host, $db_name, $db_user, $db_pass).
Set SMTP settings in $mail_host, $mail_port, etc.
Ensure the email template path in $template is correct.
Adjust other settings as needed.
Usage
Campaign Setup:
Create or update campaign details in the campanas table.
Ensure your client list is up-to-date in the baseenvio table.
Run Application:
Execute the main application script assuming that you are at root of the project
php /bin/startmail.php
The script will:
Fetch campaign details from the database.
Retrieve the client list.
Generate personalized PDF attachments using the template.
Send emails via PHPMailer to each client.

