Merge pull request #1098 from victorsl/BUG-10152

BUG 10152 "PMFSendMessage() should have an option for..." SOLVED
This commit is contained in:
julceslauhub
2012-12-14 05:43:02 -08:00
2 changed files with 7 additions and 5 deletions

View File

@@ -151,7 +151,7 @@ class spoolRun
$this->status = strtolower( $aData['app_msg_status'] ); $this->status = strtolower( $aData['app_msg_status'] );
} }
$this->setData( $sUID, $aData['app_msg_subject'], $aData['app_msg_from'], $aData['app_msg_to'], $aData['app_msg_body'], $aData['app_msg_date'], $aData['app_msg_cc'], $aData['app_msg_bcc'], $aData['app_msg_template'], $aData['app_msg_attach'] ); $this->setData($sUID, $aData["app_msg_subject"], $aData["app_msg_from"], $aData["app_msg_to"], $aData["app_msg_body"], $aData["app_msg_date"], $aData["app_msg_cc"], $aData["app_msg_bcc"], $aData["app_msg_template"], $aData["app_msg_attach"], $aData["contentTypeIsHtml"]);
} }
/** /**
@@ -171,7 +171,7 @@ class spoolRun
* @param string $sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate * @param string $sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate, $sCC, $sBCC, $sTemplate
* @return none * @return none
*/ */
public function setData ($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = '', $sCC = '', $sBCC = '', $sTemplate = '', $aAttachment = array()) public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = "", $sCC = "", $sBCC = "", $sTemplate = "", $aAttachment = array(), $bContentTypeIsHtml = true)
{ {
$this->spool_id = $sAppMsgUid; $this->spool_id = $sAppMsgUid;
$this->fileData['subject'] = $sSubject; $this->fileData['subject'] = $sSubject;
@@ -184,6 +184,7 @@ class spoolRun
$this->fileData['template'] = $sTemplate; $this->fileData['template'] = $sTemplate;
$this->fileData['attachments'] = is_array( $aAttachment ) ? $aAttachment : ($aAttachment != '' ? explode( ',', $aAttachment ) : array ()); $this->fileData['attachments'] = is_array( $aAttachment ) ? $aAttachment : ($aAttachment != '' ? explode( ',', $aAttachment ) : array ());
$this->fileData['envelope_to'] = array (); $this->fileData['envelope_to'] = array ();
$this->fileData["contentTypeIsHtml"] = $bContentTypeIsHtml;
if ($this->config['MESS_ENGINE'] == 'OPENMAIL') { if ($this->config['MESS_ENGINE'] == 'OPENMAIL') {
if ($this->config['MESS_SERVER'] != '') { if ($this->config['MESS_SERVER'] != '') {
@@ -462,7 +463,7 @@ class spoolRun
} }
} }
$oPHPMailer->IsHTML( true ); $oPHPMailer->IsHTML($this->fileData["contentTypeIsHtml"]);
if ($oPHPMailer->Send()) { if ($oPHPMailer->Send()) {
$this->error = ''; $this->error = '';

View File

@@ -747,7 +747,7 @@ class wsBase
$delIndex = 0 $delIndex = 0
) { ) {
try { try {
G::loadClass( 'system' ); G::LoadClass("system");
$aSetup = System::getEmailConfiguration(); $aSetup = System::getEmailConfiguration();
@@ -816,7 +816,8 @@ class wsBase
"app_msg_attach" => $aAttachment, "app_msg_attach" => $aAttachment,
"app_msg_template" => "", "app_msg_template" => "",
"app_msg_status" => "pending", "app_msg_status" => "pending",
"app_msg_show_message" => $showMessage "app_msg_show_message" => $showMessage,
"contentTypeIsHtml" => (preg_match("/^.+\.html?$/i", $fileTemplate))? true : false
); );
$oSpool->create( $messageArray ); $oSpool->create( $messageArray );