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:
@@ -13,6 +13,42 @@ Vtiger_Detail_Js("Inventory_Detail_Js",{
|
||||
popupInstance.show(url,function(){}, app.vtranslate('JS_SEND_PDF_MAIL') );
|
||||
}
|
||||
|
||||
},{
|
||||
testSendEmailPDFClickHandler : function(url){
|
||||
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 });
|
||||
}
|
||||
});
|
||||
}
|
||||
},{
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user