BUG 3910 Attachments to email messages

added attachment option, at least one or more  attachment file
This commit is contained in:
Carlos Pacha
2011-08-17 10:41:06 -04:00
parent 853bd5be48
commit f4e1609124

View File

@@ -332,8 +332,11 @@ class spoolRun {
$oPHPMailer->FromName = utf8_decode($this->fileData['from_name']); $oPHPMailer->FromName = utf8_decode($this->fileData['from_name']);
$oPHPMailer->Subject = utf8_decode($this->fileData['subject']); $oPHPMailer->Subject = utf8_decode($this->fileData['subject']);
$oPHPMailer->Body = utf8_decode($this->fileData['body']); $oPHPMailer->Body = utf8_decode($this->fileData['body']);
if($this->fileData['attachments']) if(is_array($this->fileData['attachments'])){
$oPHPMailer->AddAttachment($this->fileData['attachments']); foreach($this->fileData['attachments'] as $key => $fileAttach){
$oPHPMailer->AddAttachment($fileAttach);
}
}
foreach( $this->fileData['envelope_to'] as $sEmail ) { foreach( $this->fileData['envelope_to'] as $sEmail ) {
if( strpos($sEmail, '<') !== false ) { if( strpos($sEmail, '<') !== false ) {
preg_match($this->longMailEreg, $sEmail, $matches); preg_match($this->longMailEreg, $sEmail, $matches);