Skip to content

Commit

Permalink
Added alias description to banner info
Browse files Browse the repository at this point in the history
  • Loading branch information
willbrowningme committed Aug 10, 2021
1 parent 5ab2eca commit 55373af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Here are a few reasons I can think of:
* Bring your own GPG/OpenPGP key to encrypt your forwarded emails (and the option to replace subjects)
* No adverts
* No analytics or trackers (just server access logs)
* No third party content (excluding stripe.js on the subscription page)
* No third party content
* Open-source application code
* No limitation on the number of aliases that can be created
* Generous monthly bandwidth
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/ReceiveEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ protected function handleBounce($returnPath)
}

// Try to find a user from the bounced email address
if ($recipient = Recipient::select(['id', 'email'])->get()->firstWhere('email', $bouncedEmailAddress)) {
if ($recipient = Recipient::select(['id', 'user_id', 'email', 'email_verified_at'])->get()->firstWhere('email', $bouncedEmailAddress)) {
if (!isset($user)) {
$user = $recipient->user;
}
Expand Down
2 changes: 1 addition & 1 deletion app/CustomMailDriver/CustomSmtpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul
$message->generateId(); //Make sure a new Message ID is used

try {
// Get Postfix Queue ID and store in Redis for 6 hours?
// Get Postfix Queue ID and store in the database
$id = str_replace("\r\n", "", Str::after($logger->dump(), 'Ok: queued as '));

PostfixQueueId::create([
Expand Down
1 change: 1 addition & 0 deletions app/Mail/ForwardEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ public function build()
'location' => $this->bannerLocation,
'deactivateUrl' => $this->deactivateUrl,
'aliasEmail' => $this->alias->email,
'aliasDescription' => $this->alias->description,
'fromEmail' => $this->sender,
'replacedSubject' => $this->replacedSubject,
'shouldBlock' => $this->size === 0
Expand Down
4 changes: 2 additions & 2 deletions resources/views/emails/forward/html.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@if($location === 'top')
<tr>
<td style="padding:10px 20px;background-color:#fff;text-align:center;line-height:1.5;border-bottom:1px solid #cbd2d9;font-size:12px;width:100%;">
This email was sent to {{ $aliasEmail }} from {{ $fromEmail }}{{ $replacedSubject }} and has been forwarded by <a href="https://anonaddy.com" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">AnonAddy</a><br>Click <a href="{{ $deactivateUrl }}" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">here</a> to deactivate this alias
This email was sent to {{ $aliasEmail }}{{ $aliasDescription ? ' (' . $aliasDescription . ')' : '' }} from {{ $fromEmail }}{{ $replacedSubject }} and has been forwarded by <a href="https://anonaddy.com" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">AnonAddy</a><br>Click <a href="{{ $deactivateUrl }}" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">here</a> to deactivate this alias
</td>
</tr>
@endif
Expand All @@ -18,7 +18,7 @@
@if($location === 'bottom')
<tr>
<td style="padding:10px 20px;background-color:#fff;text-align:center;line-height:1.5;border-top:1px solid #cbd2d9;font-size:12px;width:100%;">
This email was sent to {{ $aliasEmail }} from {{ $fromEmail }}{{ $replacedSubject }} and has been forwarded by <a href="https://anonaddy.com" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">AnonAddy</a><br>Click <a href="{{ $deactivateUrl }}" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">here</a> to deactivate this alias
This email was sent to {{ $aliasEmail }}{{ $aliasDescription ? ' (' . $aliasDescription . ')' : '' }} from {{ $fromEmail }}{{ $replacedSubject }} and has been forwarded by <a href="https://anonaddy.com" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">AnonAddy</a><br>Click <a href="{{ $deactivateUrl }}" style="color:#2d3a8c;text-decoration:underline;" target="_blank" rel="noreferrer noopener nofollow">here</a> to deactivate this alias
</td>
</tr>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/emails/forward/text.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if($location === 'top')
This email was sent to {{ $aliasEmail }} from {{ $fromEmail }}{!! $replacedSubject !!} and has been forwarded by AnonAddy.
This email was sent to {{ $aliasEmail }}{{ $aliasDescription ? ' (' . $aliasDescription . ')' : '' }} from {{ $fromEmail }}{!! $replacedSubject !!} and has been forwarded by AnonAddy.
To deactivate this alias copy and paste the url below into your web browser.

{{ $deactivateUrl }}
Expand All @@ -14,7 +14,7 @@

-----

This email was sent to {{ $aliasEmail }} from {{ $fromEmail }}{!! $replacedSubject !!} and has been forwarded by AnonAddy.
This email was sent to {{ $aliasEmail }}{{ $aliasDescription ? ' (' . $aliasDescription . ')' : '' }} from {{ $fromEmail }}{!! $replacedSubject !!} and has been forwarded by AnonAddy.
To deactivate this alias copy and paste the url below into your web browser.

{{ $deactivateUrl }}
Expand Down

0 comments on commit 55373af

Please sign in to comment.