BUG 0000 Attachments to email messages

this feature  is properly documented
This commit is contained in:
Carlos Pacha
2011-09-15 15:56:20 -04:00
parent 79820e7e1f
commit 40be339424
3 changed files with 8 additions and 7 deletions

View File

@@ -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) | $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 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
*
*/
//@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');
$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) {
return 1;

View File

@@ -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 = '', $sAttachment = '') {
public function setData($sAppMsgUid, $sSubject, $sFrom, $sTo, $sBody, $sDate = '', $sCC = '', $sBCC = '', $sTemplate = '', $aAttachment = '') {
$this->spool_id = $sAppMsgUid;
$this->fileData['subject'] = $sSubject;
$this->fileData['from'] = $sFrom;
@@ -164,7 +164,7 @@ class spoolRun {
$this->fileData['cc'] = $sCC;
$this->fileData['bcc'] = $sBCC;
$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_SERVER'] != '' ) {

View File

@@ -596,7 +596,7 @@ class wsBase
* @param $appFields = null
* @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 {
$aSetup = getEmailConfiguration();
@@ -671,7 +671,7 @@ class wsBase
'app_msg_body' => $sBody,
'app_msg_cc' => $sCc,
'app_msg_bcc' => $sBcc,
'app_msg_attach' => $sAttachment,
'app_msg_attach' => $aAttachment,
'app_msg_template' => '',
'app_msg_status' => 'pending'
);