|
|
|
@@ -3,6 +3,7 @@ |
|
|
|
namespace App\Email; |
|
|
|
|
|
|
|
use App\Exceptions\AppCommonException; |
|
|
|
use App\Exceptions\TempFileNotExistsException; |
|
|
|
use App\Models\Email; |
|
|
|
use App\Models\EmailAttachment; |
|
|
|
use App\Models\User; |
|
|
|
@@ -82,7 +83,17 @@ abstract class BaseEmailer extends Mailable |
|
|
|
if ($this->__attachments !== null) { |
|
|
|
$count = $this->__attachments->count(); |
|
|
|
foreach ($this->__attachments as $attachment) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$filepath = $attachment->filepath; |
|
|
|
|
|
|
|
|
|
|
|
if (!file_exists($filepath)) { |
|
|
|
$e = new TempFileNotExistsException(); |
|
|
|
throw $e->setFilepath($filepath); |
|
|
|
} |
|
|
|
|
|
|
|
$as = $attachment->send_filename; |
|
|
|
$mime = $attachment->mime; |
|
|
|
$this->attach($filepath, [ |
|
|
|
|