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:
parent
b66a9b2a33
commit
b23ed24a5c
@ -122,8 +122,17 @@ class Mailer
|
|||||||
if (isset($data['account'])) {
|
if (isset($data['account'])) {
|
||||||
$account = $data['account'];
|
$account = $data['account'];
|
||||||
$logoName = $account->getLogoName();
|
$logoName = $account->getLogoName();
|
||||||
|
if (strpos($htmlBody, 'cid:' . $logoName) !== false && $account->hasLogo()) {
|
||||||
$attachments[] = PostmarkAttachment::fromFile($account->getLogoPath(), $logoName, null, 'cid:' . $logoName);
|
$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
|
// Handle invoice attachments
|
||||||
if (! empty($data['pdfString']) && ! empty($data['pdfFileName'])) {
|
if (! empty($data['pdfString']) && ! empty($data['pdfFileName'])) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="logo" style="border-collapse: collapse; vertical-align: middle; padding-left:34px; padding-top:20px; padding-bottom:12px" valign="middle">
|
<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())
|
@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
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<table cellpadding="10" cellspacing="0" border="0" bgcolor="#2F2C2B" width="600" align="center" class="header">
|
<table cellpadding="10" cellspacing="0" border="0" bgcolor="#2F2C2B" width="600" align="center" class="header">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="logo" style="border-collapse: collapse; vertical-align: middle; padding-left:34px; padding-top:20px; padding-bottom:12px" valign="middle">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -26,9 +26,9 @@
|
|||||||
|
|
||||||
@section('footer')
|
@section('footer')
|
||||||
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
|
<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_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="{{ $message->embed(public_path('images/emails/icon-twitter.png')) }}" alt="Twitter" /></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="{{ $message->embed(public_path('images/emails/icon-github.png')) }}" alt="GitHub" /></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>
|
||||||
|
|
||||||
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
|
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
|
||||||
|
Loading…
Reference in New Issue
Block a user