BUG 8065 There is a problem when we try to run the cron in pmos 2.0.34
- The envelope_to array is not empty when sent many emails, the attachemnets not included in resend enails funcition - Initialize envelope_to attribute before send a email, attachements are now included in the resen emails function
This commit is contained in:
@@ -154,7 +154,7 @@ class spoolRun {
|
||||
* @param string $sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate
|
||||
* @return none
|
||||
*/
|
||||
public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = '', $sCC = '', $sBCC = '', $sTemplate = '', $aAttachment = '') {
|
||||
public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = '', $sCC = '', $sBCC = '', $sTemplate = '', $aAttachment = array()) {
|
||||
$this->spool_id = $sAppMsgUid;
|
||||
$this->fileData['subject'] = $sSubject;
|
||||
$this->fileData['from'] = $sFrom;
|
||||
@@ -164,7 +164,8 @@ class spoolRun {
|
||||
$this->fileData['cc'] = $sCC;
|
||||
$this->fileData['bcc'] = $sBCC;
|
||||
$this->fileData['template'] = $sTemplate;
|
||||
$this->fileData['attachments'] = ($aAttachment)? $aAttachment:array();
|
||||
$this->fileData['attachments'] = is_array($aAttachment) ? $aAttachment : ($aAttachment != '' ? explode(',', $aAttachment) : array());
|
||||
$this->fileData['envelope_to'] = array();
|
||||
|
||||
if( $this->config['MESS_ENGINE'] == 'OPENMAIL' ) {
|
||||
if( $this->config['MESS_SERVER'] != '' ) {
|
||||
@@ -535,7 +536,7 @@ class spoolRun {
|
||||
while( $oDataset->next() ) {
|
||||
$aRow = $oDataset->getRow();
|
||||
try {
|
||||
$this->setData($aRow['APP_MSG_UID'], $aRow['APP_MSG_SUBJECT'], $aRow['APP_MSG_FROM'], $aRow['APP_MSG_TO'], $aRow['APP_MSG_BODY']);
|
||||
$this->setData($aRow['APP_MSG_UID'], $aRow['APP_MSG_SUBJECT'], $aRow['APP_MSG_FROM'], $aRow['APP_MSG_TO'], $aRow['APP_MSG_BODY'], date('Y-m-d H:i:s'), $aRow['APP_MSG_CC'], $aRow['APP_MSG_BCC'], $aRow['APP_MSG_TEMPLATE'], $aRow['APP_MSG_ATTACH']);
|
||||
$this->sendMail();
|
||||
} catch( Exception $oException ) {
|
||||
if( $oException->getCode() == $this->ExceptionCode['WARNING'] ) {
|
||||
|
||||
Reference in New Issue
Block a user