BUG 3910 Attachments to email messages
added attachment option, at least one or more attachment file
This commit is contained in:
@@ -1359,7 +1359,7 @@ class PHPMailer {
|
||||
4 => $type,
|
||||
5 => false, // isStringAttachment
|
||||
6 => 'attachment',
|
||||
7 => 0
|
||||
7 => count($this->attachment)
|
||||
);
|
||||
|
||||
} catch (phpmailerException $e) {
|
||||
|
||||
@@ -773,7 +773,7 @@ function getEmailConfiguration () {
|
||||
*
|
||||
*/
|
||||
//@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) {
|
||||
function PMFSendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields = array(), $sAttachment = array()) {
|
||||
|
||||
G::LoadClass('wsBase');
|
||||
$ws = new wsBase ();
|
||||
|
||||
@@ -386,8 +386,11 @@ class spoolRun {
|
||||
}
|
||||
$oPHPMailer->Body = $msBody;
|
||||
|
||||
if($this->fileData['attachments'])
|
||||
$oPHPMailer->AddAttachment($this->fileData['attachments']);
|
||||
if(is_array($this->fileData['attachments'])){
|
||||
foreach($this->fileData['attachments'] as $key => $fileAttach){
|
||||
$oPHPMailer->AddAttachment($fileAttach);
|
||||
}
|
||||
}
|
||||
foreach( $this->fileData['envelope_to'] as $sEmail ) {
|
||||
$evalMail = strpos($sEmail, '<');
|
||||
if( strpos($sEmail, '<') !== false ) {
|
||||
|
||||
@@ -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 ) {
|
||||
public function sendMessage($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $sAttachment = null ) {
|
||||
try {
|
||||
$aSetup = getEmailConfiguration();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user