Browse Source

Added alias description to banner info

Will Browning 3 years ago
parent
commit
55373af6ed

+ 1 - 1
README.md

@@ -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)
 * Bring your own GPG/OpenPGP key to encrypt your forwarded emails (and the option to replace subjects)
 * No adverts
 * No adverts
 * No analytics or trackers (just server access logs)
 * 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
 * Open-source application code
 * No limitation on the number of aliases that can be created
 * No limitation on the number of aliases that can be created
 * Generous monthly bandwidth
 * Generous monthly bandwidth

+ 1 - 1
app/Console/Commands/ReceiveEmail.php

@@ -316,7 +316,7 @@ class ReceiveEmail extends Command
             }
             }
 
 
             // Try to find a user from the bounced email address
             // 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)) {
                 if (!isset($user)) {
                     $user = $recipient->user;
                     $user = $recipient->user;
                 }
                 }

+ 1 - 1
app/CustomMailDriver/CustomSmtpTransport.php

@@ -106,7 +106,7 @@ class CustomSmtpTransport extends Swift_Transport_EsmtpTransport
         $message->generateId(); //Make sure a new Message ID is used
         $message->generateId(); //Make sure a new Message ID is used
 
 
         try {
         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 '));
             $id = str_replace("\r\n", "", Str::after($logger->dump(), 'Ok: queued as '));
 
 
             PostfixQueueId::create([
             PostfixQueueId::create([

+ 1 - 0
app/Mail/ForwardEmail.php

@@ -205,6 +205,7 @@ class ForwardEmail extends Mailable implements ShouldQueue, ShouldBeEncrypted
             'location' => $this->bannerLocation,
             'location' => $this->bannerLocation,
             'deactivateUrl' => $this->deactivateUrl,
             'deactivateUrl' => $this->deactivateUrl,
             'aliasEmail' => $this->alias->email,
             'aliasEmail' => $this->alias->email,
+            'aliasDescription' => $this->alias->description,
             'fromEmail' => $this->sender,
             'fromEmail' => $this->sender,
             'replacedSubject' => $this->replacedSubject,
             'replacedSubject' => $this->replacedSubject,
             'shouldBlock' => $this->size === 0
             'shouldBlock' => $this->size === 0

+ 2 - 2
resources/views/emails/forward/html.blade.php

@@ -6,7 +6,7 @@
             @if($location === 'top')
             @if($location === 'top')
             <tr>
             <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%;">
                 <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>
                 </td>
             </tr>
             </tr>
             @endif
             @endif
@@ -18,7 +18,7 @@
             @if($location === 'bottom')
             @if($location === 'bottom')
             <tr>
             <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%;">
                 <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>
                 </td>
             </tr>
             </tr>
             @endif
             @endif

+ 2 - 2
resources/views/emails/forward/text.blade.php

@@ -1,5 +1,5 @@
 @if($location === 'top')
 @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.
 To deactivate this alias copy and paste the url below into your web browser.
 
 
 {{ $deactivateUrl }}
 {{ $deactivateUrl }}
@@ -14,7 +14,7 @@ To deactivate this alias copy and paste the url below into your web browser.
 
 
 -----
 -----
 
 
-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.
 To deactivate this alias copy and paste the url below into your web browser.
 
 
 {{ $deactivateUrl }}
 {{ $deactivateUrl }}