PMC-57: Action BY Email: Add new option in Email Server configuration page
Code Improvements Code Improvements 1 Code Improvements 2 Fixing port labels Fixing port labels 1 Code improvements 3 Code improvements 4 Code improvements 5 Code improvements 6 Code improvements 7
This commit is contained in:
@@ -73,6 +73,10 @@ class EmailServerMapBuilder
|
||||
|
||||
$tMap->addColumn('MESS_PORT', 'MessPort', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('MESS_INCOMING_SERVER', 'MessIncomingServer', 'string', CreoleTypes::VARCHAR, true, 256);
|
||||
|
||||
$tMap->addColumn('MESS_INCOMING_PORT', 'MessIncomingPort', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('MESS_RAUTH', 'MessRauth', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('MESS_ACCOUNT', 'MessAccount', 'string', CreoleTypes::VARCHAR, true, 256);
|
||||
|
||||
@@ -51,6 +51,18 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $mess_port = 0;
|
||||
|
||||
/**
|
||||
* The value for the mess_incoming_server field.
|
||||
* @var string
|
||||
*/
|
||||
protected $mess_incoming_server = '';
|
||||
|
||||
/**
|
||||
* The value for the mess_incoming_port field.
|
||||
* @var int
|
||||
*/
|
||||
protected $mess_incoming_port = 0;
|
||||
|
||||
/**
|
||||
* The value for the mess_rauth field.
|
||||
* @var int
|
||||
@@ -163,6 +175,28 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
return $this->mess_port;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [mess_incoming_server] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMessIncomingServer()
|
||||
{
|
||||
|
||||
return $this->mess_incoming_server;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [mess_incoming_port] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getMessIncomingPort()
|
||||
{
|
||||
|
||||
return $this->mess_incoming_port;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [mess_rauth] column value.
|
||||
*
|
||||
@@ -350,6 +384,50 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
|
||||
} // setMessPort()
|
||||
|
||||
/**
|
||||
* Set the value of [mess_incoming_server] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setMessIncomingServer($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->mess_incoming_server !== $v || $v === '') {
|
||||
$this->mess_incoming_server = $v;
|
||||
$this->modifiedColumns[] = EmailServerPeer::MESS_INCOMING_SERVER;
|
||||
}
|
||||
|
||||
} // setMessIncomingServer()
|
||||
|
||||
/**
|
||||
* Set the value of [mess_incoming_port] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setMessIncomingPort($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is integer,
|
||||
// we will cast the input value to an int (if it is not).
|
||||
if ($v !== null && !is_int($v) && is_numeric($v)) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->mess_incoming_port !== $v || $v === 0) {
|
||||
$this->mess_incoming_port = $v;
|
||||
$this->modifiedColumns[] = EmailServerPeer::MESS_INCOMING_PORT;
|
||||
}
|
||||
|
||||
} // setMessIncomingPort()
|
||||
|
||||
/**
|
||||
* Set the value of [mess_rauth] column.
|
||||
*
|
||||
@@ -573,30 +651,34 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
|
||||
$this->mess_port = $rs->getInt($startcol + 3);
|
||||
|
||||
$this->mess_rauth = $rs->getInt($startcol + 4);
|
||||
$this->mess_incoming_server = $rs->getString($startcol + 4);
|
||||
|
||||
$this->mess_account = $rs->getString($startcol + 5);
|
||||
$this->mess_incoming_port = $rs->getInt($startcol + 5);
|
||||
|
||||
$this->mess_password = $rs->getString($startcol + 6);
|
||||
$this->mess_rauth = $rs->getInt($startcol + 6);
|
||||
|
||||
$this->mess_from_mail = $rs->getString($startcol + 7);
|
||||
$this->mess_account = $rs->getString($startcol + 7);
|
||||
|
||||
$this->mess_from_name = $rs->getString($startcol + 8);
|
||||
$this->mess_password = $rs->getString($startcol + 8);
|
||||
|
||||
$this->smtpsecure = $rs->getString($startcol + 9);
|
||||
$this->mess_from_mail = $rs->getString($startcol + 9);
|
||||
|
||||
$this->mess_try_send_inmediatly = $rs->getInt($startcol + 10);
|
||||
$this->mess_from_name = $rs->getString($startcol + 10);
|
||||
|
||||
$this->mail_to = $rs->getString($startcol + 11);
|
||||
$this->smtpsecure = $rs->getString($startcol + 11);
|
||||
|
||||
$this->mess_default = $rs->getInt($startcol + 12);
|
||||
$this->mess_try_send_inmediatly = $rs->getInt($startcol + 12);
|
||||
|
||||
$this->mail_to = $rs->getString($startcol + 13);
|
||||
|
||||
$this->mess_default = $rs->getInt($startcol + 14);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 13; // 13 = EmailServerPeer::NUM_COLUMNS - EmailServerPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 15; // 15 = EmailServerPeer::NUM_COLUMNS - EmailServerPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating EmailServer object", $e);
|
||||
@@ -813,30 +895,36 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
return $this->getMessPort();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getMessRauth();
|
||||
return $this->getMessIncomingServer();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getMessAccount();
|
||||
return $this->getMessIncomingPort();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getMessPassword();
|
||||
return $this->getMessRauth();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getMessFromMail();
|
||||
return $this->getMessAccount();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getMessFromName();
|
||||
return $this->getMessPassword();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getSmtpsecure();
|
||||
return $this->getMessFromMail();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getMessTrySendInmediatly();
|
||||
return $this->getMessFromName();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getMailTo();
|
||||
return $this->getSmtpsecure();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getMessTrySendInmediatly();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getMailTo();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getMessDefault();
|
||||
break;
|
||||
default:
|
||||
@@ -863,15 +951,17 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
$keys[1] => $this->getMessEngine(),
|
||||
$keys[2] => $this->getMessServer(),
|
||||
$keys[3] => $this->getMessPort(),
|
||||
$keys[4] => $this->getMessRauth(),
|
||||
$keys[5] => $this->getMessAccount(),
|
||||
$keys[6] => $this->getMessPassword(),
|
||||
$keys[7] => $this->getMessFromMail(),
|
||||
$keys[8] => $this->getMessFromName(),
|
||||
$keys[9] => $this->getSmtpsecure(),
|
||||
$keys[10] => $this->getMessTrySendInmediatly(),
|
||||
$keys[11] => $this->getMailTo(),
|
||||
$keys[12] => $this->getMessDefault(),
|
||||
$keys[4] => $this->getMessIncomingServer(),
|
||||
$keys[5] => $this->getMessIncomingPort(),
|
||||
$keys[6] => $this->getMessRauth(),
|
||||
$keys[7] => $this->getMessAccount(),
|
||||
$keys[8] => $this->getMessPassword(),
|
||||
$keys[9] => $this->getMessFromMail(),
|
||||
$keys[10] => $this->getMessFromName(),
|
||||
$keys[11] => $this->getSmtpsecure(),
|
||||
$keys[12] => $this->getMessTrySendInmediatly(),
|
||||
$keys[13] => $this->getMailTo(),
|
||||
$keys[14] => $this->getMessDefault(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -916,30 +1006,36 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
$this->setMessPort($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setMessRauth($value);
|
||||
$this->setMessIncomingServer($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setMessAccount($value);
|
||||
$this->setMessIncomingPort($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setMessPassword($value);
|
||||
$this->setMessRauth($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setMessFromMail($value);
|
||||
$this->setMessAccount($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setMessFromName($value);
|
||||
$this->setMessPassword($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setSmtpsecure($value);
|
||||
$this->setMessFromMail($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setMessTrySendInmediatly($value);
|
||||
$this->setMessFromName($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setMailTo($value);
|
||||
$this->setSmtpsecure($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setMessTrySendInmediatly($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setMailTo($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setMessDefault($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -982,39 +1078,47 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[4], $arr)) {
|
||||
$this->setMessRauth($arr[$keys[4]]);
|
||||
$this->setMessIncomingServer($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[5], $arr)) {
|
||||
$this->setMessAccount($arr[$keys[5]]);
|
||||
$this->setMessIncomingPort($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[6], $arr)) {
|
||||
$this->setMessPassword($arr[$keys[6]]);
|
||||
$this->setMessRauth($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
$this->setMessFromMail($arr[$keys[7]]);
|
||||
$this->setMessAccount($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setMessFromName($arr[$keys[8]]);
|
||||
$this->setMessPassword($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[9], $arr)) {
|
||||
$this->setSmtpsecure($arr[$keys[9]]);
|
||||
$this->setMessFromMail($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[10], $arr)) {
|
||||
$this->setMessTrySendInmediatly($arr[$keys[10]]);
|
||||
$this->setMessFromName($arr[$keys[10]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[11], $arr)) {
|
||||
$this->setMailTo($arr[$keys[11]]);
|
||||
$this->setSmtpsecure($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setMessDefault($arr[$keys[12]]);
|
||||
$this->setMessTrySendInmediatly($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setMailTo($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[14], $arr)) {
|
||||
$this->setMessDefault($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1044,6 +1148,14 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
$criteria->add(EmailServerPeer::MESS_PORT, $this->mess_port);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(EmailServerPeer::MESS_INCOMING_SERVER)) {
|
||||
$criteria->add(EmailServerPeer::MESS_INCOMING_SERVER, $this->mess_incoming_server);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(EmailServerPeer::MESS_INCOMING_PORT)) {
|
||||
$criteria->add(EmailServerPeer::MESS_INCOMING_PORT, $this->mess_incoming_port);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(EmailServerPeer::MESS_RAUTH)) {
|
||||
$criteria->add(EmailServerPeer::MESS_RAUTH, $this->mess_rauth);
|
||||
}
|
||||
@@ -1140,6 +1252,10 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setMessPort($this->mess_port);
|
||||
|
||||
$copyObj->setMessIncomingServer($this->mess_incoming_server);
|
||||
|
||||
$copyObj->setMessIncomingPort($this->mess_incoming_port);
|
||||
|
||||
$copyObj->setMessRauth($this->mess_rauth);
|
||||
|
||||
$copyObj->setMessAccount($this->mess_account);
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseEmailServerPeer
|
||||
const CLASS_DEFAULT = 'classes.model.EmailServer';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 13;
|
||||
const NUM_COLUMNS = 15;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -43,6 +43,12 @@ abstract class BaseEmailServerPeer
|
||||
/** the column name for the MESS_PORT field */
|
||||
const MESS_PORT = 'EMAIL_SERVER.MESS_PORT';
|
||||
|
||||
/** the column name for the MESS_INCOMING_SERVER field */
|
||||
const MESS_INCOMING_SERVER = 'EMAIL_SERVER.MESS_INCOMING_SERVER';
|
||||
|
||||
/** the column name for the MESS_INCOMING_PORT field */
|
||||
const MESS_INCOMING_PORT = 'EMAIL_SERVER.MESS_INCOMING_PORT';
|
||||
|
||||
/** the column name for the MESS_RAUTH field */
|
||||
const MESS_RAUTH = 'EMAIL_SERVER.MESS_RAUTH';
|
||||
|
||||
@@ -81,10 +87,10 @@ abstract class BaseEmailServerPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('MessUid', 'MessEngine', 'MessServer', 'MessPort', 'MessRauth', 'MessAccount', 'MessPassword', 'MessFromMail', 'MessFromName', 'Smtpsecure', 'MessTrySendInmediatly', 'MailTo', 'MessDefault', ),
|
||||
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID, EmailServerPeer::MESS_ENGINE, EmailServerPeer::MESS_SERVER, EmailServerPeer::MESS_PORT, EmailServerPeer::MESS_RAUTH, EmailServerPeer::MESS_ACCOUNT, EmailServerPeer::MESS_PASSWORD, EmailServerPeer::MESS_FROM_MAIL, EmailServerPeer::MESS_FROM_NAME, EmailServerPeer::SMTPSECURE, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY, EmailServerPeer::MAIL_TO, EmailServerPeer::MESS_DEFAULT, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('MESS_UID', 'MESS_ENGINE', 'MESS_SERVER', 'MESS_PORT', 'MESS_RAUTH', 'MESS_ACCOUNT', 'MESS_PASSWORD', 'MESS_FROM_MAIL', 'MESS_FROM_NAME', 'SMTPSECURE', 'MESS_TRY_SEND_INMEDIATLY', 'MAIL_TO', 'MESS_DEFAULT', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
BasePeer::TYPE_PHPNAME => array ('MessUid', 'MessEngine', 'MessServer', 'MessPort', 'MessIncomingServer', 'MessIncomingPort', 'MessRauth', 'MessAccount', 'MessPassword', 'MessFromMail', 'MessFromName', 'Smtpsecure', 'MessTrySendInmediatly', 'MailTo', 'MessDefault', ),
|
||||
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID, EmailServerPeer::MESS_ENGINE, EmailServerPeer::MESS_SERVER, EmailServerPeer::MESS_PORT, EmailServerPeer::MESS_INCOMING_SERVER, EmailServerPeer::MESS_INCOMING_PORT, EmailServerPeer::MESS_RAUTH, EmailServerPeer::MESS_ACCOUNT, EmailServerPeer::MESS_PASSWORD, EmailServerPeer::MESS_FROM_MAIL, EmailServerPeer::MESS_FROM_NAME, EmailServerPeer::SMTPSECURE, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY, EmailServerPeer::MAIL_TO, EmailServerPeer::MESS_DEFAULT, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('MESS_UID', 'MESS_ENGINE', 'MESS_SERVER', 'MESS_PORT', 'MESS_INCOMING_SERVER', 'MESS_INCOMING_PORT', 'MESS_RAUTH', 'MESS_ACCOUNT', 'MESS_PASSWORD', 'MESS_FROM_MAIL', 'MESS_FROM_NAME', 'SMTPSECURE', 'MESS_TRY_SEND_INMEDIATLY', 'MAIL_TO', 'MESS_DEFAULT', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -94,10 +100,10 @@ abstract class BaseEmailServerPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('MessUid' => 0, 'MessEngine' => 1, 'MessServer' => 2, 'MessPort' => 3, 'MessRauth' => 4, 'MessAccount' => 5, 'MessPassword' => 6, 'MessFromMail' => 7, 'MessFromName' => 8, 'Smtpsecure' => 9, 'MessTrySendInmediatly' => 10, 'MailTo' => 11, 'MessDefault' => 12, ),
|
||||
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID => 0, EmailServerPeer::MESS_ENGINE => 1, EmailServerPeer::MESS_SERVER => 2, EmailServerPeer::MESS_PORT => 3, EmailServerPeer::MESS_RAUTH => 4, EmailServerPeer::MESS_ACCOUNT => 5, EmailServerPeer::MESS_PASSWORD => 6, EmailServerPeer::MESS_FROM_MAIL => 7, EmailServerPeer::MESS_FROM_NAME => 8, EmailServerPeer::SMTPSECURE => 9, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY => 10, EmailServerPeer::MAIL_TO => 11, EmailServerPeer::MESS_DEFAULT => 12, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('MESS_UID' => 0, 'MESS_ENGINE' => 1, 'MESS_SERVER' => 2, 'MESS_PORT' => 3, 'MESS_RAUTH' => 4, 'MESS_ACCOUNT' => 5, 'MESS_PASSWORD' => 6, 'MESS_FROM_MAIL' => 7, 'MESS_FROM_NAME' => 8, 'SMTPSECURE' => 9, 'MESS_TRY_SEND_INMEDIATLY' => 10, 'MAIL_TO' => 11, 'MESS_DEFAULT' => 12, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
BasePeer::TYPE_PHPNAME => array ('MessUid' => 0, 'MessEngine' => 1, 'MessServer' => 2, 'MessPort' => 3, 'MessIncomingServer' => 4, 'MessIncomingPort' => 5, 'MessRauth' => 6, 'MessAccount' => 7, 'MessPassword' => 8, 'MessFromMail' => 9, 'MessFromName' => 10, 'Smtpsecure' => 11, 'MessTrySendInmediatly' => 12, 'MailTo' => 13, 'MessDefault' => 14, ),
|
||||
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID => 0, EmailServerPeer::MESS_ENGINE => 1, EmailServerPeer::MESS_SERVER => 2, EmailServerPeer::MESS_PORT => 3, EmailServerPeer::MESS_INCOMING_SERVER => 4, EmailServerPeer::MESS_INCOMING_PORT => 5, EmailServerPeer::MESS_RAUTH => 6, EmailServerPeer::MESS_ACCOUNT => 7, EmailServerPeer::MESS_PASSWORD => 8, EmailServerPeer::MESS_FROM_MAIL => 9, EmailServerPeer::MESS_FROM_NAME => 10, EmailServerPeer::SMTPSECURE => 11, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY => 12, EmailServerPeer::MAIL_TO => 13, EmailServerPeer::MESS_DEFAULT => 14, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('MESS_UID' => 0, 'MESS_ENGINE' => 1, 'MESS_SERVER' => 2, 'MESS_PORT' => 3, 'MESS_INCOMING_SERVER' => 4, 'MESS_INCOMING_PORT' => 5, 'MESS_RAUTH' => 6, 'MESS_ACCOUNT' => 7, 'MESS_PASSWORD' => 8, 'MESS_FROM_MAIL' => 9, 'MESS_FROM_NAME' => 10, 'SMTPSECURE' => 11, 'MESS_TRY_SEND_INMEDIATLY' => 12, 'MAIL_TO' => 13, 'MESS_DEFAULT' => 14, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -206,6 +212,10 @@ abstract class BaseEmailServerPeer
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_PORT);
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_INCOMING_SERVER);
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_INCOMING_PORT);
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_RAUTH);
|
||||
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);
|
||||
|
||||
@@ -4866,6 +4866,8 @@
|
||||
<column name="MESS_ENGINE" type="VARCHAR" size="256" required="true" default=""/>
|
||||
<column name="MESS_SERVER" type="VARCHAR" size="256" required="true" default=""/>
|
||||
<column name="MESS_PORT" type="INTEGER" required="true" default="0"/>
|
||||
<column name="MESS_INCOMING_SERVER" type="VARCHAR" size="256" required="true" default=""/>
|
||||
<column name="MESS_INCOMING_PORT" type="INTEGER" required="true" default="0"/>
|
||||
<column name="MESS_RAUTH" type="INTEGER" required="true" default="0"/>
|
||||
<column name="MESS_ACCOUNT" type="VARCHAR" size="256" required="true" default=""/>
|
||||
<column name="MESS_PASSWORD" type="VARCHAR" size="256" required="true" default=""/>
|
||||
|
||||
@@ -23477,6 +23477,18 @@ msgstr "Sent By"
|
||||
msgid "[LABEL/ID_SERVER] Server"
|
||||
msgstr "Server"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_OUTGOING_SERVER
|
||||
#: LABEL/ID_OUTGOING_SERVER
|
||||
msgid "Outgoing Server"
|
||||
msgstr "Outgoing Server"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_INCOMING_SERVER
|
||||
#: LABEL/ID_INCOMING_SERVER
|
||||
msgid "Incoming Server"
|
||||
msgstr "Incoming Server"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_SERVER_ADDRESS
|
||||
#: LABEL/ID_SERVER_ADDRESS
|
||||
@@ -27929,6 +27941,18 @@ msgstr "Photo gallery"
|
||||
msgid "Port (default 25)"
|
||||
msgstr "Port (default 25)"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/INCOMING_PORT_DEFAULT
|
||||
#: LABEL/INCOMING_PORT_DEFAULT
|
||||
msgid "Incoming Port (default 143)"
|
||||
msgstr "Incoming Port (default 143)"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/OUTGOING_PORT_DEFAULT
|
||||
#: LABEL/OUTGOING_PORT_DEFAULT
|
||||
msgid "Outgoing Port (default 25)"
|
||||
msgstr "Outgoing Port (default 25)"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/REQUIRE_AUTHENTICATION
|
||||
#: LABEL/REQUIRE_AUTHENTICATION
|
||||
|
||||
@@ -58425,6 +58425,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_INACTIVE','en','Inactive','2014-01-15') ,
|
||||
( 'LABEL','ID_INBOX','en','Inbox','2014-01-15') ,
|
||||
( 'LABEL','ID_INBOX_EMPTY','en','Your Inbox is empty...','2015-05-06') ,
|
||||
( 'LABEL','ID_INCOMING_SERVER','en','Incoming Server','2018-11-23') ,
|
||||
( 'LABEL','ID_INCORRECT_EMAIL','en','Your E-mail address is not valid.','2014-01-15') ,
|
||||
( 'LABEL','ID_INCORRECT_USERNAME_PASSWORD','en','Incorrect username or password','2014-01-15') ,
|
||||
( 'LABEL','ID_INCORRECT_VALUE_ACTION','en','The value for $action is incorrect.','2014-05-29') ,
|
||||
@@ -60201,6 +60202,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_ORIGIN_TASK','en','Origin Task','2014-01-15') ,
|
||||
( 'LABEL','ID_OTHER','en','Other','2014-01-15') ,
|
||||
( 'LABEL','ID_OUTBOX','en','Outbox','2014-01-15') ,
|
||||
( 'LABEL','ID_OUTGOING_SERVER','en','Outgoing Server','2018-11-23') ,
|
||||
( 'LABEL','ID_OUTPUT_DB','en','Output','2014-10-08') ,
|
||||
( 'LABEL','ID_OUTPUT_DOCUMENT','en','Output Document','2014-01-15') ,
|
||||
( 'LABEL','ID_OUTPUT_DOCUMENTS','en','Output Documents','2014-01-15') ,
|
||||
@@ -61462,6 +61464,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','IMPORT_PROCESS_DISABLE','en','Disable the current process and create a new version of the process','2014-01-15') ,
|
||||
( 'LABEL','IMPORT_PROCESS_NEW','en','Create a completely new process without changing the current process','2014-01-15') ,
|
||||
( 'LABEL','IMPORT_PROCESS_OVERWRITING','en','Update the current process, overwriting all tasks and steps','2014-01-15') ,
|
||||
( 'LABEL','INCOMING_PORT_DEFAULT','en','Incoming Port (default 143)','2018-11-23') ,
|
||||
( 'LABEL','INVALID_FILE','en','Invalid file!','2014-01-15') ,
|
||||
( 'LABEL','IS_USER_NAME_DISPLAY_FORMAT','en','User Name Display Format','2014-01-15') ,
|
||||
( 'LABEL','LOGIN','en','Login','2014-01-15') ,
|
||||
@@ -61529,6 +61532,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','NEW_SITE_SUCCESS_CONFIRM','en','Do you want open the new site?','2014-01-15') ,
|
||||
( 'LABEL','NEW_SITE_SUCCESS_CONFIRMNOTE','en','Note.- If you open the new site your current session will be closed.','2014-01-15') ,
|
||||
( 'LABEL','OPEN_NEW_WS','en','Open new site','2014-01-15') ,
|
||||
( 'LABEL','OUTGOING_PORT_DEFAULT','en','Outgoing Port (default 25)','2018-11-26') ,
|
||||
( 'LABEL','OUTPUT_CREATE','en','Output document has been created successfully','2014-01-15') ,
|
||||
( 'LABEL','PASSWORD_HISTORY','en','Password history','2014-01-15') ,
|
||||
( 'LABEL','PAUSED','en','Pause','2014-01-15') ,
|
||||
|
||||
@@ -2744,6 +2744,8 @@ CREATE TABLE `EMAIL_SERVER`
|
||||
`MESS_ENGINE` VARCHAR(256) default '' NOT NULL,
|
||||
`MESS_SERVER` VARCHAR(256) default '' NOT NULL,
|
||||
`MESS_PORT` INTEGER default 0 NOT NULL,
|
||||
`MESS_INCOMING_SERVER` VARCHAR(256) default '' NOT NULL,
|
||||
`MESS_INCOMING_PORT` INTEGER default 0 NOT NULL,
|
||||
`MESS_RAUTH` INTEGER default 0 NOT NULL,
|
||||
`MESS_ACCOUNT` VARCHAR(256) default '' NOT NULL,
|
||||
`MESS_PASSWORD` VARCHAR(256) default '' NOT NULL,
|
||||
|
||||
@@ -9,6 +9,8 @@ switch ($option) {
|
||||
|
||||
$server = "";
|
||||
$port = "";
|
||||
$incomingServer = "";
|
||||
$incomingPort = "";
|
||||
$reqAuthentication = 0;
|
||||
$password = "";
|
||||
$smtpSecure = "";
|
||||
@@ -27,6 +29,14 @@ switch ($option) {
|
||||
$reqAuthentication = (int)($_POST["reqAuthentication"]);
|
||||
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
|
||||
$smtpSecure = $_POST["smtpSecure"];
|
||||
} elseif ($cboEmailEngine == "IMAP") {
|
||||
$server = $_POST["server"];
|
||||
$port = (int)($_POST["port"]);
|
||||
$incomingServer = $_POST["incomingServer"];
|
||||
$incomingPort = (int)($_POST["incomingPort"]);
|
||||
$reqAuthentication = (int)($_POST["reqAuthentication"]);
|
||||
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
|
||||
$smtpSecure = $_POST["smtpSecure"];
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -34,6 +44,8 @@ switch ($option) {
|
||||
"MESS_ENGINE" => $cboEmailEngine,
|
||||
"MESS_SERVER" => $server,
|
||||
"MESS_PORT" => $port,
|
||||
"MESS_INCOMING_SERVER" => $incomingServer,
|
||||
"MESS_INCOMING_PORT" => $incomingPort,
|
||||
"MESS_RAUTH" => $reqAuthentication,
|
||||
"MESS_ACCOUNT" => $accountFrom,
|
||||
"MESS_PASSWORD" => $password,
|
||||
@@ -63,6 +75,8 @@ switch ($option) {
|
||||
|
||||
$server = "";
|
||||
$port = "";
|
||||
$incomingServer = "";
|
||||
$incomingPort = "";
|
||||
$reqAuthentication = 0;
|
||||
$password = "";
|
||||
$smtpSecure = "";
|
||||
@@ -81,6 +95,14 @@ switch ($option) {
|
||||
$reqAuthentication = (int)($_POST["reqAuthentication"]);
|
||||
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
|
||||
$smtpSecure = $_POST["smtpSecure"];
|
||||
} elseif ($cboEmailEngine == "IMAP") {
|
||||
$server = $_POST["server"];
|
||||
$port = (int)($_POST["port"]);
|
||||
$incomingServer = $_POST["incomingServer"];
|
||||
$incomingPort = (int)($_POST["incomingPort"]);
|
||||
$reqAuthentication = (int)($_POST["reqAuthentication"]);
|
||||
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
|
||||
$smtpSecure = $_POST["smtpSecure"];
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -88,6 +110,8 @@ switch ($option) {
|
||||
"MESS_ENGINE" => $cboEmailEngine,
|
||||
"MESS_SERVER" => $server,
|
||||
"MESS_PORT" => $port,
|
||||
"MESS_INCOMING_SERVER" => $incomingServer,
|
||||
"MESS_INCOMING_PORT" => $incomingPort,
|
||||
"MESS_RAUTH" => $reqAuthentication,
|
||||
"MESS_ACCOUNT" => $accountFrom,
|
||||
"MESS_PASSWORD" => $password,
|
||||
@@ -153,6 +177,8 @@ switch ($option) {
|
||||
|
||||
$server = "";
|
||||
$port = "";
|
||||
$incomingServer = "";
|
||||
$incomingPort = "";
|
||||
$reqAuthentication = 0;
|
||||
$password = "";
|
||||
$smtpSecure = "";
|
||||
@@ -165,7 +191,7 @@ switch ($option) {
|
||||
$mailTo = ($sendTestMail == 1)? $_POST["mailTo"] : "";
|
||||
$emailServerDefault = (int)($_POST["emailServerDefault"]);
|
||||
|
||||
if ($cboEmailEngine == "PHPMAILER") {
|
||||
if ($cboEmailEngine == "PHPMAILER" || $cboEmailEngine == "IMAP") {
|
||||
$server = $_POST["server"];
|
||||
$port = (int)($_POST["port"]);
|
||||
$reqAuthentication = (int)($_POST["reqAuthentication"]);
|
||||
|
||||
@@ -13,9 +13,11 @@ class EmailServer
|
||||
{
|
||||
private $arrayFieldDefinition = array(
|
||||
"MESS_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "emailServerUid"),
|
||||
"MESS_ENGINE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("PHPMAILER", "MAIL"), "fieldNameAux" => "emailServerEngine"),
|
||||
"MESS_ENGINE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("PHPMAILER", "MAIL", "IMAP"), "fieldNameAux" => "emailServerEngine"),
|
||||
"MESS_SERVER" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerServer"),
|
||||
"MESS_PORT" => array("type" => "int", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPort"),
|
||||
"MESS_INCOMING_SERVER" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerIncomingServer"),
|
||||
"MESS_INCOMING_PORT" => array("type" => "int", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerIncomingPort"),
|
||||
"MESS_RAUTH" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "emailServerRauth"),
|
||||
"MESS_ACCOUNT" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerUserName"),
|
||||
"MESS_PASSWORD" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPassword"),
|
||||
@@ -525,6 +527,7 @@ class EmailServer
|
||||
}
|
||||
break;
|
||||
case "PHPMAILER":
|
||||
case "IMAP":
|
||||
$numSteps = ($arrayData['MAIL_TO'] != '') ? count($arrayPhpMailerTestName) :
|
||||
count($arrayPhpMailerTestName) - 1;
|
||||
for ($step = 1; $step <= $numSteps; $step++) {
|
||||
@@ -829,6 +832,8 @@ class EmailServer
|
||||
'engine'=> $arrayData["MESS_ENGINE"],
|
||||
'server' => $arrayData["MESS_SERVER"],
|
||||
'port' => $arrayData["MESS_PORT"],
|
||||
'incomingServer' => $arrayData["MESS_INCOMING_SERVER"],
|
||||
'incomingPort' => $arrayData["MESS_INCOMING_PORT"],
|
||||
'requireAuthentication' => $arrayData["MESS_RAUTH"],
|
||||
'account' => $arrayData["MESS_ACCOUNT"],
|
||||
'senderEmail' => $arrayData["MESS_FROM_MAIL"],
|
||||
@@ -1000,6 +1005,8 @@ class EmailServer
|
||||
'engine' => $arrayData["MESS_ENGINE"],
|
||||
'server' => $arrayData["MESS_SERVER"],
|
||||
'port' => $arrayData["MESS_PORT"],
|
||||
'incomingServer' => $arrayData["MESS_INCOMING_SERVER"],
|
||||
'incomingPort' => $arrayData["MESS_INCOMING_PORT"],
|
||||
'requireAuthentication' => $arrayData["MESS_RAUTH"],
|
||||
'account' => $arrayData["MESS_ACCOUNT"],
|
||||
'senderEmail' => $arrayData["MESS_FROM_MAIL"],
|
||||
@@ -1086,6 +1093,8 @@ class EmailServer
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_ENGINE);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_SERVER);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_PORT);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_INCOMING_SERVER);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_INCOMING_PORT);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_RAUTH);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_ACCOUNT);
|
||||
$criteria->addSelectColumn(\EmailServerPeer::MESS_PASSWORD);
|
||||
@@ -1118,6 +1127,8 @@ class EmailServer
|
||||
$this->getFieldNameByFormatFieldName("MESS_ENGINE") => $record["MESS_ENGINE"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_SERVER") => $record["MESS_SERVER"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_PORT") => $record["MESS_PORT"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_INCOMING_SERVER") => $record["MESS_INCOMING_SERVER"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_INCOMING_PORT") => $record["MESS_INCOMING_PORT"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_RAUTH") => $record["MESS_RAUTH"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_ACCOUNT") => $record["MESS_ACCOUNT"],
|
||||
$this->getFieldNameByFormatFieldName("MESS_PASSWORD") => $record["MESS_PASSWORD"],
|
||||
@@ -1163,6 +1174,8 @@ class EmailServer
|
||||
$arrayData["MESS_ENGINE"] = $row["MESS_ENGINE"];
|
||||
$arrayData["MESS_SERVER"] = $row["MESS_SERVER"];
|
||||
$arrayData["MESS_PORT"] = (int)($row["MESS_PORT"]);
|
||||
$arrayData["MESS_INCOMING_SERVER"] = $row["MESS_INCOMING_SERVER"];
|
||||
$arrayData["MESS_INCOMING_PORT"] = (int)($row["MESS_INCOMING_PORT"]);
|
||||
$arrayData["MESS_RAUTH"] = (int)($row["MESS_RAUTH"]);
|
||||
$arrayData["MESS_ACCOUNT"] = $row["MESS_ACCOUNT"];
|
||||
$arrayData["MESS_PASSWORD"] = $row["MESS_PASSWORD"];
|
||||
@@ -1219,6 +1232,7 @@ class EmailServer
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::MESS_ENGINE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE)->addOr(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::MESS_SERVER, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::MESS_INCOMING_SERVER,"%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::MESS_ACCOUNT, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::MESS_FROM_NAME, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
|
||||
$criteria->getNewCriterion(\EmailServerPeer::SMTPSECURE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))
|
||||
@@ -1243,7 +1257,7 @@ class EmailServer
|
||||
if (!is_null($sortField) && trim($sortField) != "") {
|
||||
$sortField = strtoupper($sortField);
|
||||
|
||||
if (in_array($sortField, array("MESS_ENGINE", "MESS_SERVER", "MESS_ACCOUNT", "MESS_FROM_NAME", "SMTPSECURE"))) {
|
||||
if (in_array($sortField, array("MESS_ENGINE", "MESS_SERVER", "MESS_INCOMING_SERVER", "MESS_ACCOUNT", "MESS_FROM_NAME", "SMTPSECURE"))) {
|
||||
$sortField = \EmailServerPeer::TABLE_NAME . "." . $sortField;
|
||||
} else {
|
||||
$sortField = \EmailServerPeer::MESS_ENGINE;
|
||||
@@ -1316,6 +1330,7 @@ class EmailServer
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
$row["MESS_PORT"] = (int)($row["MESS_PORT"]);
|
||||
$row["MESS_INCOMING_PORT"] = (int)($row["MESS_INCOMING_PORT"]);
|
||||
$row["MESS_RAUTH"] = (int)($row["MESS_RAUTH"]);
|
||||
$row["MESS_TRY_SEND_INMEDIATLY"] = (int)($row["MESS_TRY_SEND_INMEDIATLY"]);
|
||||
$row["MESS_DEFAULT"] = (int)($row["MESS_DEFAULT"]);
|
||||
|
||||
@@ -48,83 +48,67 @@ emailServer.application = {
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
||||
|
||||
if (typeEmailEngine === "PHPMAILER") {
|
||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
server: Ext.getCmp("txtServer").getValue(),
|
||||
port: Ext.getCmp("txtPort").getValue(),
|
||||
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked) ? 1 : 0,
|
||||
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
|
||||
password: Ext.getCmp("txtPassword").getValue(),
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
smtpSecure: smtpSecure,
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked) ? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
} else if (typeEmailEngine === "IMAP") {
|
||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
server: Ext.getCmp("txtServer").getValue(),
|
||||
port: Ext.getCmp("txtPort").getValue(),
|
||||
incomingServer: Ext.getCmp("txtIncomingServer").getValue(),
|
||||
incomingPort: Ext.getCmp("txtIncomingPort").getValue(),
|
||||
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked) ? 1 : 0,
|
||||
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
|
||||
password: Ext.getCmp("txtPassword").getValue(),
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
smtpSecure: smtpSecure,
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked) ? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
} else {
|
||||
//MAIL
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
}
|
||||
|
||||
switch (option) {
|
||||
case "INS":
|
||||
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
||||
|
||||
|
||||
if (typeEmailEngine == "PHPMAILER") {
|
||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
server: Ext.getCmp("txtServer").getValue(),
|
||||
port: Ext.getCmp("txtPort").getValue(),
|
||||
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
|
||||
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
|
||||
password: Ext.getCmp("txtPassword").getValue(),
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
smtpSecure: smtpSecure,
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
} else {
|
||||
//MAIL
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
}
|
||||
break;
|
||||
case "UPD":
|
||||
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
||||
|
||||
if (typeEmailEngine == "PHPMAILER") {
|
||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||
|
||||
p = {
|
||||
option: option,
|
||||
emailServerUid: emailServerUid,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
server: Ext.getCmp("txtServer").getValue(),
|
||||
port: Ext.getCmp("txtPort").getValue(),
|
||||
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
|
||||
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
|
||||
password: Ext.getCmp("txtPassword").getValue(),
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
smtpSecure: smtpSecure,
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
} else {
|
||||
//MAIL
|
||||
p = {
|
||||
option: option,
|
||||
emailServerUid: emailServerUid,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
}
|
||||
p.emailServerUid = emailServerUid;
|
||||
break;
|
||||
case "DEL":
|
||||
p = {
|
||||
@@ -132,45 +116,6 @@ emailServer.application = {
|
||||
emailServerUid: emailServerUid
|
||||
};
|
||||
break;
|
||||
//case "LST":
|
||||
// break;
|
||||
case "TEST":
|
||||
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
|
||||
|
||||
if (typeEmailEngine == "PHPMAILER") {
|
||||
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
|
||||
var smtpSecure = rdoGrpOption.getGroupValue();
|
||||
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
server: Ext.getCmp("txtServer").getValue(),
|
||||
port: Ext.getCmp("txtPort").getValue(),
|
||||
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
|
||||
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
|
||||
password: Ext.getCmp("txtPassword").getValue(),
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
smtpSecure: smtpSecure,
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
} else {
|
||||
//MAIL
|
||||
p = {
|
||||
option: option,
|
||||
|
||||
cboEmailEngine: typeEmailEngine,
|
||||
fromMail: Ext.getCmp("txtFromMail").getValue(),
|
||||
fromName: Ext.getCmp("txtFromName").getValue(),
|
||||
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
|
||||
mailTo: Ext.getCmp("txtMailTo").getValue(),
|
||||
emailServerDefault: emailDefault
|
||||
};
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Ext.Ajax.request({
|
||||
@@ -240,11 +185,16 @@ emailServer.application = {
|
||||
|
||||
Ext.getCmp("txtServer").allowBlank = true;
|
||||
Ext.getCmp("txtPort").allowBlank = true;
|
||||
Ext.getCmp("txtIncomingServer").allowBlank = true;
|
||||
Ext.getCmp("txtIncomingPort").allowBlank = true;
|
||||
Ext.getCmp("txtAccountFrom").allowBlank = true;
|
||||
|
||||
Ext.getCmp("txtServer").setValue("");
|
||||
Ext.getCmp("txtPort").setValue("");
|
||||
|
||||
Ext.getCmp("txtIncomingServer").setValue("");
|
||||
Ext.getCmp("txtIncomingPort").setValue("");
|
||||
|
||||
Ext.getCmp("chkReqAuthentication").setValue(false);
|
||||
|
||||
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
|
||||
@@ -272,6 +222,8 @@ emailServer.application = {
|
||||
|
||||
Ext.getCmp("txtServer").allowBlank = false;
|
||||
Ext.getCmp("txtPort").allowBlank = false;
|
||||
Ext.getCmp("txtIncomingServer").allowBlank = false;
|
||||
Ext.getCmp("txtIncomingPort").allowBlank = false;
|
||||
Ext.getCmp("txtAccountFrom").allowBlank = false;
|
||||
break;
|
||||
case "UPD":
|
||||
@@ -286,6 +238,9 @@ emailServer.application = {
|
||||
Ext.getCmp("txtServer").setValue(record.get("MESS_SERVER"));
|
||||
Ext.getCmp("txtPort").setValue((record.get("MESS_PORT") != 0)? record.get("MESS_PORT") : "");
|
||||
|
||||
Ext.getCmp("txtIncomingServer").setValue(record.get("MESS_INCOMING_SERVER"));
|
||||
Ext.getCmp("txtIncomingPort").setValue((record.get("MESS_INCOMING_PORT") !== 0)? record.get("MESS_INCOMING_PORT") : "");
|
||||
|
||||
Ext.getCmp("chkReqAuthentication").setValue((parseInt(record.get("MESS_RAUTH")) == 1)? true : false);
|
||||
|
||||
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
|
||||
@@ -323,10 +278,46 @@ emailServer.application = {
|
||||
{
|
||||
Ext.getCmp("frmEmailServer").getForm().clearInvalid();
|
||||
|
||||
if (cboEmailEngine == "PHPMAILER") {
|
||||
if (cboEmailEngine === "PHPMAILER") {
|
||||
Ext.getCmp("txtServer").setVisible(true);
|
||||
Ext.getCmp("txtPort").setVisible(true);
|
||||
|
||||
try {
|
||||
Ext.getCmp("txtServer").label.update(_("ID_SERVER"));
|
||||
Ext.getCmp("txtPort").label.update(_("PORT_DEFAULT"));
|
||||
} catch (err) {
|
||||
Ext.getCmp("txtServer").fieldLabel = _("ID_SERVER");
|
||||
Ext.getCmp("txtPort").fieldLabel = _("PORT_DEFAULT");
|
||||
}
|
||||
|
||||
Ext.getCmp("txtIncomingServer").setVisible(false);
|
||||
Ext.getCmp("txtIncomingPort").setVisible(false);
|
||||
|
||||
Ext.getCmp("chkReqAuthentication").setVisible(true);
|
||||
|
||||
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
|
||||
|
||||
Ext.getCmp("txtAccountFrom").setVisible(true);
|
||||
Ext.getCmp("rdoGrpSmtpSecure").setVisible(true);
|
||||
|
||||
Ext.getCmp("txtServer").allowBlank = false;
|
||||
Ext.getCmp("txtPort").allowBlank = false;
|
||||
Ext.getCmp("txtAccountFrom").allowBlank = false;
|
||||
} else if (cboEmailEngine === "IMAP") {
|
||||
Ext.getCmp("txtServer").setVisible(true);
|
||||
Ext.getCmp("txtPort").setVisible(true);
|
||||
|
||||
try {
|
||||
Ext.getCmp("txtServer").label.update(_("ID_OUTGOING_SERVER"));
|
||||
Ext.getCmp("txtPort").label.update(_("OUTGOING_PORT_DEFAULT"));
|
||||
} catch (err) {
|
||||
Ext.getCmp("txtServer").fieldLabel = _("ID_OUTGOING_SERVER");
|
||||
Ext.getCmp("txtPort").fieldLabel = _("OUTGOING_PORT_DEFAULT");
|
||||
}
|
||||
|
||||
Ext.getCmp("txtIncomingServer").setVisible(true);
|
||||
Ext.getCmp("txtIncomingPort").setVisible(true);
|
||||
|
||||
Ext.getCmp("chkReqAuthentication").setVisible(true);
|
||||
|
||||
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
|
||||
@@ -342,6 +333,9 @@ emailServer.application = {
|
||||
Ext.getCmp("txtServer").setVisible(false);
|
||||
Ext.getCmp("txtPort").setVisible(false);
|
||||
|
||||
Ext.getCmp("txtIncomingServer").setVisible(false);
|
||||
Ext.getCmp("txtIncomingPort").setVisible(false);
|
||||
|
||||
Ext.getCmp("chkReqAuthentication").setVisible(false);
|
||||
|
||||
emailServerSetPassword(false);
|
||||
@@ -384,7 +378,7 @@ emailServer.application = {
|
||||
|
||||
FLAGTEST = 1;
|
||||
|
||||
if (option == "PHPMAILER") {
|
||||
if (option === "PHPMAILER" || option === "IMAP") {
|
||||
if (typeof(testData.resolving_name) != "undefined") {
|
||||
if (testData.resolving_name.result) {
|
||||
msg = msg + "<img src = \"/images/select-icon.png\" width=\"17\" height=\"17\" style=\"margin-right: 0.9em; color: #0000FF;\" />" + testData.resolving_name.title + "<br />";
|
||||
@@ -492,6 +486,8 @@ emailServer.application = {
|
||||
{name: "MESS_ENGINE", type: "string"},
|
||||
{name: "MESS_SERVER", type: "string"},
|
||||
{name: "MESS_PORT", type: "int"},
|
||||
{name: "MESS_INCOMING_SERVER", type: "string"},
|
||||
{name: "MESS_INCOMING_PORT", type: "int"},
|
||||
{name: "MESS_RAUTH", type: "int"},
|
||||
{name: "MESS_ACCOUNT", type: "string"},
|
||||
{name: "MESS_PASSWORD", type: "string"},
|
||||
@@ -548,6 +544,7 @@ emailServer.application = {
|
||||
|
||||
data: [
|
||||
["PHPMAILER", "SMTP (PHPMailer)"],
|
||||
["IMAP", "SMTP - IMAP (PHPMailer)"],
|
||||
["MAIL", "Mail (PHP)"]
|
||||
]
|
||||
});
|
||||
@@ -597,6 +594,24 @@ emailServer.application = {
|
||||
emptyText: null
|
||||
});
|
||||
|
||||
var txtIncomingServer = new Ext.form.TextField({
|
||||
id: "txtIncomingServer",
|
||||
name: "txtIncomingServer",
|
||||
|
||||
fieldLabel: _("ID_INCOMING_SERVER") //Server
|
||||
});
|
||||
|
||||
var txtIncomingPort = new Ext.form.NumberField({
|
||||
id: "txtIncomingPort",
|
||||
name: "txtIncomingPort",
|
||||
|
||||
fieldLabel: _("INCOMING_PORT_DEFAULT"), //Port (default 993)
|
||||
|
||||
anchor: "36%",
|
||||
maxLength: 3,
|
||||
emptyText: null
|
||||
});
|
||||
|
||||
var chkReqAuthentication = new Ext.form.Checkbox({
|
||||
id: "chkReqAuthentication",
|
||||
name: "chkReqAuthentication",
|
||||
@@ -745,7 +760,7 @@ emailServer.application = {
|
||||
var winData = new Ext.Window({
|
||||
layout: "fit",
|
||||
width: 550,
|
||||
height: 388,
|
||||
height: 450,
|
||||
//title: "",
|
||||
modal: true,
|
||||
resizable: false,
|
||||
@@ -772,6 +787,8 @@ emailServer.application = {
|
||||
cboEmailEngine,
|
||||
txtServer,
|
||||
txtPort,
|
||||
txtIncomingServer,
|
||||
txtIncomingPort,
|
||||
chkReqAuthentication,
|
||||
txtAccountFrom,
|
||||
txtPassword,
|
||||
@@ -997,6 +1014,16 @@ emailServer.application = {
|
||||
return (value != 0)? value : "-";
|
||||
};
|
||||
|
||||
var rendererMessIncomingServer = function (value)
|
||||
{
|
||||
return (value !== "")? value : "-";
|
||||
};
|
||||
|
||||
var rendererMessIncomingPort = function (value)
|
||||
{
|
||||
return (value !== 0)? value : "-";
|
||||
};
|
||||
|
||||
var rendererMessSmtpSecure = function (value)
|
||||
{
|
||||
return (value != "")? value : "-";
|
||||
@@ -1017,6 +1044,8 @@ emailServer.application = {
|
||||
{id: "MESS_ENGINE", dataIndex: "MESS_ENGINE", hidden: false, header: _("EMAIL_ENGINE"), width: 80, hideable: true, align: "left"},
|
||||
{id: "MESS_SERVER", dataIndex: "MESS_SERVER", hidden: false, header: _("ID_SERVER"), width: 150, hideable: true, align: "center", renderer: rendererMessServer},
|
||||
{id: "MESS_PORT", dataIndex: "MESS_PORT", hidden: false, header: _("ID_EMAIL_SERVER_PORT"), width: 50, hideable: true, align: "center", renderer: rendererMessPort},
|
||||
{id: "MESS_INCOMING_SERVER", dataIndex: "MESS_INCOMING_SERVER", hidden: true, header: _("ID_INCOMING_SERVER"), width: 150, hideable: true, align: "center", renderer: rendererMessIncomingServer},
|
||||
{id: "MESS_INCOMING_PORT", dataIndex: "MESS_INCOMING_PORT", hidden: true, header: _("ID_EMAIL_SERVER_PORT"), width: 50, hideable: true, align: "center", renderer: rendererMessIncomingPort},
|
||||
{id: "MESS_RAUTH", dataIndex: "MESS_RAUTH", hidden: true, header: _("REQUIRE_AUTHENTICATION"), width: 50, hideable: false, align: "left"},
|
||||
{id: "MESS_ACCOUNT", dataIndex: "MESS_ACCOUNT", hidden: false, header: _("ID_EMAIL_SERVER_ACCOUNT_FROM"), width: 130, hideable: true, align: "left"},
|
||||
{id: "MESS_PASSWORD", dataIndex: "MESS_PASSWORD", hidden: true, header: _("ID_PASSWORD"), width: 130, hideable: false, align: "left"},
|
||||
|
||||
Reference in New Issue
Block a user