BUG 0000 Attachments to email messages
this feature is properly documented
This commit is contained in:
@@ -768,16 +768,17 @@ function getEmailConfiguration () {
|
|||||||
* @param string(32) | $sBcc | Email addres for copies hidden | The email address(es) of people who will receive blind carbon copies of the email.
|
* @param string(32) | $sBcc | Email addres for copies hidden | The email address(es) of people who will receive blind carbon copies of the email.
|
||||||
* @param string(32) | $sSubject | Subject of the email | The subject (title) of the email.
|
* @param string(32) | $sSubject | Subject of the email | The subject (title) of the email.
|
||||||
* @param string(32) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
* @param string(32) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
||||||
* @param array | $aFields | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
* @param array | $aFields | An optional associative array | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
|
||||||
|
* @param array | $aAttachment | An optional array | Optional parameter. An array of files (full paths) to be attached to the email.
|
||||||
* @return int | $result | result | Result of sending email
|
* @return int | $result | result | Result of sending email
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
//@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
||||||
function PMFSendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields = array(), $sAttachment = array()) {
|
function PMFSendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields = array(), $aAttachment = array()) {
|
||||||
|
|
||||||
G::LoadClass('wsBase');
|
G::LoadClass('wsBase');
|
||||||
$ws = new wsBase ();
|
$ws = new wsBase ();
|
||||||
$result = $ws->sendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields, $sAttachment);
|
$result = $ws->sendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields, $aAttachment);
|
||||||
|
|
||||||
if ( $result->status_code == 0) {
|
if ( $result->status_code == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -154,7 +154,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 = '', $sAttachment = '') {
|
public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = '', $sCC = '', $sBCC = '', $sTemplate = '', $aAttachment = '') {
|
||||||
$this->spool_id = $sAppMsgUid;
|
$this->spool_id = $sAppMsgUid;
|
||||||
$this->fileData['subject'] = $sSubject;
|
$this->fileData['subject'] = $sSubject;
|
||||||
$this->fileData['from'] = $sFrom;
|
$this->fileData['from'] = $sFrom;
|
||||||
@@ -164,7 +164,7 @@ class spoolRun {
|
|||||||
$this->fileData['cc'] = $sCC;
|
$this->fileData['cc'] = $sCC;
|
||||||
$this->fileData['bcc'] = $sBCC;
|
$this->fileData['bcc'] = $sBCC;
|
||||||
$this->fileData['template'] = $sTemplate;
|
$this->fileData['template'] = $sTemplate;
|
||||||
$this->fileData['attachments'] = ($sAttachment)? $sAttachment:array();
|
$this->fileData['attachments'] = ($aAttachment)? $aAttachment:array();
|
||||||
|
|
||||||
if( $this->config['MESS_ENGINE'] == 'OPENMAIL' ) {
|
if( $this->config['MESS_ENGINE'] == 'OPENMAIL' ) {
|
||||||
if( $this->config['MESS_SERVER'] != '' ) {
|
if( $this->config['MESS_SERVER'] != '' ) {
|
||||||
|
|||||||
@@ -596,7 +596,7 @@ class wsBase
|
|||||||
* @param $appFields = null
|
* @param $appFields = null
|
||||||
* @return $result will return an object
|
* @return $result will return an object
|
||||||
*/
|
*/
|
||||||
public function sendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $sAttachment = null ) {
|
public function sendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $aAttachment = null ) {
|
||||||
try {
|
try {
|
||||||
$aSetup = getEmailConfiguration();
|
$aSetup = getEmailConfiguration();
|
||||||
|
|
||||||
@@ -671,7 +671,7 @@ class wsBase
|
|||||||
'app_msg_body' => $sBody,
|
'app_msg_body' => $sBody,
|
||||||
'app_msg_cc' => $sCc,
|
'app_msg_cc' => $sCc,
|
||||||
'app_msg_bcc' => $sBcc,
|
'app_msg_bcc' => $sBcc,
|
||||||
'app_msg_attach' => $sAttachment,
|
'app_msg_attach' => $aAttachment,
|
||||||
'app_msg_template' => '',
|
'app_msg_template' => '',
|
||||||
'app_msg_status' => 'pending'
|
'app_msg_status' => 'pending'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user