diff --git a/app/Http/Livewire/Help.php b/app/Http/Livewire/Help.php
new file mode 100644
index 000000000..107821501
--- /dev/null
+++ b/app/Http/Livewire/Help.php
@@ -0,0 +1,54 @@
+ 'required|min:10',
+ 'subject' => 'required|min:3'
+ ];
+ public function mount()
+ {
+ $this->path = Route::current()->uri();
+ if (isDev()) {
+ $this->description = "I'm having trouble with {$this->path}";
+ $this->subject = "Help with {$this->path}";
+ }
+ }
+ public function submit()
+ {
+ try {
+ $this->rateLimit(1, 60);
+ $this->validate();
+ $subscriptionType = auth()->user()?->subscription?->type() ?? 'unknown';
+ $debug = "Route: {$this->path}";
+ $mail = new MailMessage();
+ $mail->view(
+ 'emails.help',
+ [
+ 'description' => $this->description,
+ 'debug' => $debug
+ ]
+ );
+ $mail->subject("[HELP - {$subscriptionType}]: {$this->subject}");
+ send_user_an_email($mail, 'hi@coollabs.io');
+ $this->emit('success', 'Your message has been sent successfully. We will get in touch with you as soon as possible.');
+ } catch (\Exception $e) {
+ return general_error_handler($e, $this);
+ }
+ }
+ public function render()
+ {
+ return view('livewire.help')->layout('layouts.app');
+ }
+}
diff --git a/app/Notifications/Channels/TransactionalEmailChannel.php b/app/Notifications/Channels/TransactionalEmailChannel.php
index aa5541dee..2985d5183 100644
--- a/app/Notifications/Channels/TransactionalEmailChannel.php
+++ b/app/Notifications/Channels/TransactionalEmailChannel.php
@@ -12,7 +12,6 @@ use Log;
class TransactionalEmailChannel
{
- private bool $isResend = false;
public function send(User $notifiable, Notification $notification): void
{
$settings = InstanceSettings::get();
@@ -26,33 +25,14 @@ class TransactionalEmailChannel
}
$this->bootConfigs();
$mailMessage = $notification->toMail($notifiable);
- // if ($this->isResend) {
Mail::send(
[],
[],
fn (Message $message) => $message
- ->from(
- data_get($settings, 'smtp_from_address'),
- data_get($settings, 'smtp_from_name'),
- )
->to($email)
->subject($mailMessage->subject)
->html((string)$mailMessage->render())
);
- // } else {
- // Mail::send(
- // [],
- // [],
- // fn (Message $message) => $message
- // ->from(
- // data_get($settings, 'smtp_from_address'),
- // data_get($settings, 'smtp_from_name'),
- // )
- // ->bcc($email)
- // ->subject($mailMessage->subject)
- // ->html((string)$mailMessage->render())
- // );
- // }
}
private function bootConfigs(): void
@@ -61,8 +41,5 @@ class TransactionalEmailChannel
if (!$type) {
throw new Exception('No email settings found.');
}
- if ($type === 'resend') {
- $this->isResend = true;
- }
}
}
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 7056b159b..e45dfa08a 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -7,7 +7,6 @@ use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
use Illuminate\Database\QueryException;
use Illuminate\Mail\Message;
use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Route;
@@ -261,15 +260,10 @@ function send_user_an_email(MailMessage $mail, string $email): void
[],
[],
fn (Message $message) => $message
- ->from(
- data_get($settings, 'smtp_from_address'),
- data_get($settings, 'smtp_from_name')
- )
->to($email)
->subject($mail->subject)
->html((string) $mail->render())
);
-
}
function isEmailEnabled($notifiable)
{
diff --git a/bootstrap/helpers/subscriptions.php b/bootstrap/helpers/subscriptions.php
index 7691ca7d6..ae3506782 100644
--- a/bootstrap/helpers/subscriptions.php
+++ b/bootstrap/helpers/subscriptions.php
@@ -47,6 +47,9 @@ function getEndDate()
function isSubscriptionActive()
{
+ if (!isCloud()) {
+ return false;
+ }
$team = currentTeam();
if (!$team) {
return false;
diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php
index 711515437..d31dc542a 100644
--- a/resources/views/components/modal.blade.php
+++ b/resources/views/components/modal.blade.php
@@ -43,10 +43,6 @@
@endisset
@if ($modalSubmit)
{{ $modalSubmit }}
- @else
-