1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix logos w/postmark

This commit is contained in:
Hillel Coren 2018-02-26 10:31:12 +02:00
parent b66a9b2a33
commit b23ed24a5c
3 changed files with 15 additions and 6 deletions

View File

@ -122,8 +122,17 @@ class Mailer
if (isset($data['account'])) {
$account = $data['account'];
$logoName = $account->getLogoName();
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
if (! empty($data['pdfString']) && ! empty($data['pdfFileName'])) {

View File

@ -10,7 +10,7 @@
<tr>
<td class="logo" style="border-collapse: collapse; vertical-align: middle; padding-left:34px; padding-top:20px; padding-bottom:12px" valign="middle">
@if (Utils::isNinja() || ! Utils::isWhiteLabel())
<img src="{{ $message->embed(public_path('images/invoiceninja-logo.png')) }}" alt="Invoice Ninja" />
<img src="{{ isset($message) ? $message->embed(public_path('images/invoiceninja-logo.png')) : 'cid:invoiceninja-logo.png' }}" alt="Invoice Ninja" />
@endif
</td>
</tr>

View File

@ -9,7 +9,7 @@
<table cellpadding="10" cellspacing="0" border="0" bgcolor="#2F2C2B" width="600" align="center" class="header">
<tr>
<td class="logo" style="border-collapse: collapse; vertical-align: middle; padding-left:34px; padding-top:20px; padding-bottom:12px" valign="middle">
<img src="{{ $message->embed(public_path('images/invoiceninja-logo.png')) }}" alt="Invoice Ninja" />
<img src="{{ isset($message) ? $message->embed(public_path('images/invoiceninja-logo.png')) : 'cid:invoiceninja-logo.png' }}" alt="Invoice Ninja" />
</td>
</tr>
</table>
@ -26,9 +26,9 @@
@section('footer')
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
<a href="{{ SOCIAL_LINK_FACEBOOK }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-facebook.png')) }}" alt="Facebook" /></a>
<a href="{{ SOCIAL_LINK_TWITTER }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-twitter.png')) }}" alt="Twitter" /></a>
<a href="{{ SOCIAL_LINK_GITHUB }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ $message->embed(public_path('images/emails/icon-github.png')) }}" alt="GitHub" /></a>
<a href="{{ SOCIAL_LINK_FACEBOOK }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ isset($message) ? $message->embed(public_path('images/emails/icon-facebook.png')) : 'cid:icon-facebook.png' }}" alt="Facebook" /></a>
<a href="{{ SOCIAL_LINK_TWITTER }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ isset($message) ? $message->embed(public_path('images/emails/icon-twitter.png')) : 'cid:icon-twitter.png' }}" alt="Twitter" /></a>
<a href="{{ SOCIAL_LINK_GITHUB }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;"><img src="{{ isset($message) ? $message->embed(public_path('images/emails/icon-github.png')) : 'cid:icon-github.png' }}" alt="GitHub" /></a>
</p>
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">