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.
This commit is contained in:
@@ -197,6 +197,45 @@ Vtiger.Class("Settings_Vtiger_OutgoingServer_Js",{},{
|
||||
}
|
||||
|
||||
});
|
||||
jQuery(document).ready(function () {
|
||||
jQuery('#sendTestMail').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var params = {
|
||||
module: 'Vtiger',
|
||||
parent: 'Settings',
|
||||
action: 'OutgoingServerAjax',
|
||||
mode: 'sendTestMail'
|
||||
};
|
||||
|
||||
app.helper.showProgress();
|
||||
|
||||
app.request.post({ data: params }).then(function (err, data) {
|
||||
console.log("data",data);
|
||||
console.log("err",err);
|
||||
|
||||
|
||||
app.helper.hideProgress();
|
||||
if (err === null) {
|
||||
if (data && data.success) {
|
||||
app.helper.showSuccessNotification({
|
||||
message: data.message || '✅ Test mail sent successfully!'
|
||||
});
|
||||
} else if (data && data.error) {
|
||||
app.helper.showErrorNotification({
|
||||
message: data.error.message || '❌ Mailer Error.'
|
||||
});
|
||||
} else {
|
||||
app.helper.showErrorNotification({
|
||||
message: '❌ Unknown error. Check logs.'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
app.helper.showErrorNotification({ message: '❌ ' + err.message });
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Settings_Vtiger_OutgoingServer_Js("Settings_Vtiger_OutgoingServerEdit_Js",{},{});
|
||||
|
||||
Reference in New Issue
Block a user