diff --git a/app/Ninja/Mailers/Mailer.php b/app/Ninja/Mailers/Mailer.php index 6277acb368..1270e0390b 100644 --- a/app/Ninja/Mailers/Mailer.php +++ b/app/Ninja/Mailers/Mailer.php @@ -122,7 +122,16 @@ class Mailer if (isset($data['account'])) { $account = $data['account']; $logoName = $account->getLogoName(); - $attachments[] = PostmarkAttachment::fromFile($account->getLogoPath(), $logoName, null, 'cid:' . $logoName); + if (strpos($htmlBody, 'cid:' . $logoName) !== false && $account->hasLogo()) { + $attachments[] = PostmarkAttachment::fromFile($account->getLogoPath(), $logoName, null, 'cid:' . $logoName); + } + } + + if (strpos($htmlBody, 'cid:invoiceninja-logo.png') !== false) { + $attachments[] = PostmarkAttachment::fromFile(public_path('images/invoiceninja-logo.png'), 'invoiceninja-logo.png', null, 'cid:invoiceninja-logo.png'); + $attachments[] = PostmarkAttachment::fromFile(public_path('images/emails/icon-facebook.png'), 'icon-facebook.png', null, 'cid:icon-facebook.png'); + $attachments[] = PostmarkAttachment::fromFile(public_path('images/emails/icon-twitter.png'), 'icon-twitter.png', null, 'cid:icon-twitter.png'); + $attachments[] = PostmarkAttachment::fromFile(public_path('images/emails/icon-github.png'), 'icon-github.png', null, 'cid:icon-github.png'); } // Handle invoice attachments diff --git a/resources/views/emails/master_contact.blade.php b/resources/views/emails/master_contact.blade.php index 4a52e15e4f..be1a1256d4 100644 --- a/resources/views/emails/master_contact.blade.php +++ b/resources/views/emails/master_contact.blade.php @@ -10,7 +10,7 @@
- + |