From 4b3f51cc1095cbfcf9e776dd6e8c8ebba3e6e525 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 5 Jul 2020 01:47:48 -0300 Subject: [PATCH] adiciona suporte para anexos --- application/libraries/MY_Email.php | 2 ++ schema/Schema.sql | 1 + 2 files changed, 3 insertions(+) diff --git a/application/libraries/MY_Email.php b/application/libraries/MY_Email.php index 0fe2522..914ec23 100644 --- a/application/libraries/MY_Email.php +++ b/application/libraries/MY_Email.php @@ -86,6 +86,7 @@ public function send($skip_job = FALSE) 'bcc' => $bcc, 'message' => $this->_body, 'headers' => serialize($this->_headers), + 'attachments' => serialize($this->_attachments), 'status' => 'pending', 'date' => $date ); @@ -131,6 +132,7 @@ public function send_queue() $bcc = !empty($email->bcc) ? explode(", ", $email->bcc) : array(); $this->_headers = unserialize($email->headers); + $this->_attachments = unserialize($email->attachments); $this->to($recipients); $this->cc($cc); diff --git a/schema/Schema.sql b/schema/Schema.sql index a43f9d0..6df9db1 100644 --- a/schema/Schema.sql +++ b/schema/Schema.sql @@ -6,6 +6,7 @@ CREATE TABLE `email_queue` ( `cc` varchar(255) DEFAULT NULL, `bcc` varchar(255) DEFAULT NULL, `message` text NOT NULL, + `attachments` longtext NOT NULL, `status` enum('pending','sending','sent','failed') DEFAULT NULL, `date` datetime DEFAULT NULL, `headers` text,