BUG 10152 "PMFSendMessage() should have an option for..." SOLVED
- PMFSendMessage function can't be set for send mail with format text plain
- Fixed, PMFSendMessage now use the extension of the template for get the
format of the mail, example:
> path_to_template/MyTemplate.html
the extension is html, then use text/html content type for the mail
> path_to_template/MyTemplate.txt
the extension is txt, then use text/plain content type for the mail
> If the extension is different to html/htm, then used text/plain in all cases
* Available from version ProcessMaker-2.0.46
This commit is contained in:
@@ -151,7 +151,7 @@ class spoolRun
|
||||
$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
|
||||
* @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->fileData['subject'] = $sSubject;
|
||||
@@ -184,6 +184,7 @@ class spoolRun
|
||||
$this->fileData['template'] = $sTemplate;
|
||||
$this->fileData['attachments'] = is_array( $aAttachment ) ? $aAttachment : ($aAttachment != '' ? explode( ',', $aAttachment ) : array ());
|
||||
$this->fileData['envelope_to'] = array ();
|
||||
$this->fileData["contentTypeIsHtml"] = $bContentTypeIsHtml;
|
||||
|
||||
if ($this->config['MESS_ENGINE'] == 'OPENMAIL') {
|
||||
if ($this->config['MESS_SERVER'] != '') {
|
||||
@@ -462,7 +463,7 @@ class spoolRun
|
||||
}
|
||||
}
|
||||
|
||||
$oPHPMailer->IsHTML( true );
|
||||
$oPHPMailer->IsHTML($this->fileData["contentTypeIsHtml"]);
|
||||
|
||||
if ($oPHPMailer->Send()) {
|
||||
$this->error = '';
|
||||
|
||||
@@ -747,7 +747,7 @@ class wsBase
|
||||
$delIndex = 0
|
||||
) {
|
||||
try {
|
||||
G::loadClass( 'system' );
|
||||
G::LoadClass("system");
|
||||
|
||||
$aSetup = System::getEmailConfiguration();
|
||||
|
||||
@@ -816,7 +816,8 @@ class wsBase
|
||||
"app_msg_attach" => $aAttachment,
|
||||
"app_msg_template" => "",
|
||||
"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 );
|
||||
|
||||
Reference in New Issue
Block a user