Files
CRM/testmail.php
BACHIR SOULDI 2a647b138a feat: Enhance email functionality and PDF generation for Sales Orders
- Enabled SMTP debugging in PHPMailer for better error tracking.
- Added a "Test send email" link in the Inventory Detail View for quick email testing.
- Implemented automatic PDF generation and email sending upon Sales Order creation.
- Created a new action for sending Sales Order emails with attached PDFs.
- Added a new AJAX action for testing outgoing email server configurations.
- Updated outgoing server settings to use new SMTP credentials.
- Improved email templates for better user experience.
- Added test scripts for validating PDF generation and email sending.
2026-02-17 15:59:31 +01:00

25 lines
754 B
PHP

<?php
include_once 'vtlib/Vtiger/Mailer.php';
$mailer = new Vtiger_Mailer();
$mailer->IsSMTP();
$mailer->Host = 'mail.carixin.com'; // your SMTP host
$mailer->Port = 587; // or 465
$mailer->SMTPAuth = true;
$mailer->Username = 'contact@carixin.com';
$mailer->Password = 'carixin@2025';
$mailer->SMTPSecure = 'tls'; // or 'ssl'
$mailer->From = 'contact@carixin.com';
$mailer->FromName = 'ERP Test';
$mailer->AddAddress('souldibachir3150@gmail.com', 'Admin');
$mailer->Subject = 'SMTP Test from Vtiger';
$mailer->Body = 'If you see this email, SMTP works!';
$mailer->SMTPDebug = 2;
$mailer->Debugoutput = 'html';
$mailer->Send();
if ($mailer->Send()) {
echo "✅ Mail sent successfully!";
} else {
echo "❌ Mail failed: " . $mailer->ErrorInfo;
}