BUG 14723 "Error en la configuracióe un correo..." SOLVED
- Error en la configuracion correo SMTP. - Problema resuelto, en ADMIN > Email se agrega un nuevo campo "From Mail" en dynaform "Configuration", el cual permite introducir el mail del usuario. Con este campo el usuario podra agregar su cuenta de correo y al hacer click en el boton "Test", el tests se realizara correctamente y no mostrara el error.
This commit is contained in:
committed by
Erik Amaru Ortiz
parent
ada97d9103
commit
070beaadc6
@@ -368,12 +368,14 @@ class adminProxy extends HttpProxyController
|
||||
G::LoadThirdParty('phpmailer', 'class.smtp');
|
||||
|
||||
if ($_POST['typeTest'] == 'MAIL') {
|
||||
$eregMail = "/^[0-9a-zA-Z]+(?:[._][0-9a-zA-Z]+)*@[0-9a-zA-Z]+(?:[._-][0-9a-zA-Z]+)*\.[0-9a-zA-Z]{2,3}$/";
|
||||
|
||||
define("SUCCESSFUL", 'SUCCESSFUL');
|
||||
define("FAILED", 'FAILED');
|
||||
$mail_to = $_POST['mail_to'];
|
||||
$send_test_mail = $_POST['send_test_mail'];
|
||||
$_POST['FROM_NAME'] = $mail_to;
|
||||
$_POST['FROM_EMAIL'] = $mail_to;
|
||||
$_POST['FROM_NAME'] = G::LoadTranslation("ID_MESS_TEST_BODY");
|
||||
$_POST['FROM_EMAIL'] = ($_POST["from_mail"] != "" && preg_match($eregMail, $_POST["from_mail"]))? $_POST["from_mail"] : "";
|
||||
$_POST['MESS_ENGINE'] = 'MAIL';
|
||||
$_POST['MESS_SERVER'] = 'localhost';
|
||||
$_POST['MESS_PORT'] = 25;
|
||||
|
||||
@@ -34,8 +34,8 @@ Ext.onReady(function(){
|
||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("fromMail").setVisible(false);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("fromMail").setVisible(true);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(true);
|
||||
} else {
|
||||
Ext.getCmp('Server').setVisible(true);
|
||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
|
||||
@@ -165,8 +165,9 @@ Ext.onReady(function(){
|
||||
Ext.getCmp('Password').getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("fromMail").setVisible(false);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(false);
|
||||
|
||||
Ext.getCmp("fromMail").setVisible(true);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(true);
|
||||
} else {
|
||||
Ext.getCmp('Server').setVisible(true);
|
||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
|
||||
@@ -299,7 +300,7 @@ Ext.onReady(function(){
|
||||
},
|
||||
{
|
||||
xtype: 'textfield',
|
||||
fieldLabel: _('ACCOUNT_FROM'),//'Account From',
|
||||
fieldLabel: _("ID_USER_NAME"), //'Account From',
|
||||
id:'AccountFrom',
|
||||
name:'AccountFrom',
|
||||
vtype:'emailUrlValidation',
|
||||
@@ -467,8 +468,14 @@ Ext.onReady(function(){
|
||||
Ext.getCmp('UseSecureConnection').setVisible(false);
|
||||
Ext.getCmp('UseSecureConnection').getEl().up('.x-form-item').setDisplayed(false);
|
||||
|
||||
Ext.getCmp("fromMail").setVisible(false);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(false);
|
||||
Ext.getCmp("fromMail").setVisible(true);
|
||||
Ext.getCmp("fromMail").getEl().up('.x-form-item').setDisplayed(true);
|
||||
|
||||
if (typeof (res.data.MESS_FROM_MAIL) != "undefined"){
|
||||
Ext.getCmp("fromMail").setValue(res.data.MESS_FROM_MAIL);
|
||||
} else {
|
||||
Ext.getCmp("fromMail").setValue("");
|
||||
}
|
||||
} else {
|
||||
Ext.getCmp('Server').setVisible(true);
|
||||
Ext.getCmp('Server').getEl().up('.x-form-item').setDisplayed(true); // hide label
|
||||
@@ -841,7 +848,8 @@ var testMethod = function()
|
||||
typeTest : 'MAIL',
|
||||
request : 'mailTestMail_Show',
|
||||
mail_to : 'admin@processmaker.com',
|
||||
send_test_mail : 'yes'
|
||||
send_test_mail : 'yes',
|
||||
from_mail : Ext.getCmp("fromMail").getValue()
|
||||
};
|
||||
|
||||
Ext.getCmp('step11').setText('<span id="rstep11"></span> '+_('LOGIN_VERIFY_MSG')+' <b> Mail Transport Agent </b>', false);
|
||||
|
||||
Reference in New Issue
Block a user