diff --git a/app/EmailData.php b/app/EmailData.php index 9a479c1..ecc42c8 100644 --- a/app/EmailData.php +++ b/app/EmailData.php @@ -21,8 +21,8 @@ class EmailData foreach ($parser->getAttachments() as $attachment) { $this->attachments[] = [ 'stream' => base64_encode(stream_get_contents($attachment->getStream())), - 'file_name' => $attachment->getFileName(), - 'mime' => $attachment->getContentType() + 'file_name' => base64_encode($attachment->getFileName()), + 'mime' => base64_encode($attachment->getContentType()) ]; } } diff --git a/app/Mail/ForwardEmail.php b/app/Mail/ForwardEmail.php index 8215b9e..ece4234 100644 --- a/app/Mail/ForwardEmail.php +++ b/app/Mail/ForwardEmail.php @@ -100,8 +100,8 @@ class ForwardEmail extends Mailable implements ShouldQueue foreach ($this->emailAttachments as $attachment) { $email->attachData( base64_decode($attachment['stream']), - $attachment['file_name'], - ['mime' => $attachment['mime']] + base64_decode($attachment['file_name']), + ['mime' => base64_decode($attachment['mime'])] ); } diff --git a/app/Mail/ReplyToEmail.php b/app/Mail/ReplyToEmail.php index bcb44b3..af89ec4 100644 --- a/app/Mail/ReplyToEmail.php +++ b/app/Mail/ReplyToEmail.php @@ -71,8 +71,8 @@ class ReplyToEmail extends Mailable implements ShouldQueue foreach ($this->emailAttachments as $attachment) { $email->attachData( base64_decode($attachment['stream']), - $attachment['file_name'], - ['mime' => $attachment['mime']] + base64_decode($attachment['file_name']), + ['mime' => base64_decode($attachment['mime'])] ); }