diff --git a/config/mail_brands.php b/config/mail_brands.php new file mode 100644 index 0000000..c0fa4a7 --- /dev/null +++ b/config/mail_brands.php @@ -0,0 +1,123 @@ + env( + 'LADILL_ACCOUNT_URL', + 'https://'.env('ACCOUNT_DOMAIN', 'account.'.$platformHost) + ), + + 'brands' => [ + 'ladill' => [ + 'name' => 'Ladill', + 'logo' => 'ladill-logo-white.png', + 'logo_class' => 'email-logo', + 'app_url' => env('APP_URL', 'https://ladill.com'), + 'footer_account' => 'an account with Ladill', + 'dashboard_path' => '/dashboard', + 'support_path' => '/support', + 'home_label' => 'ladill.com', + ], + 'hosting' => [ + 'name' => 'Ladill Hosting', + 'logo' => 'ladillhosting-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_HOSTING_APP_URL', 'https://hosting.ladill.com'), + 'footer_account' => 'a Ladill Hosting account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'hosting.ladill.com', + ], + 'domains' => [ + 'name' => 'Ladill Domains', + 'logo' => 'ladilldomains-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_DOMAINS_APP_URL', 'https://domains.ladill.com'), + 'footer_account' => 'a Ladill Domains account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'domains.ladill.com', + ], + 'bird' => [ + 'name' => 'Ladill Bird', + 'logo' => 'ladillbird-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_BIRD_APP_URL', 'https://bird.ladill.com'), + 'footer_account' => 'a Ladill Bird account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'bird.ladill.com', + ], + 'mail' => [ + 'name' => 'Ladill Mail', + 'logo' => 'ladillmail-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_WEBMAIL_URL', 'https://mail.ladill.com'), + 'footer_account' => 'a Ladill Mail account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'mail.ladill.com', + ], + 'email' => [ + 'name' => 'Ladill Email', + 'logo' => 'ladillemail-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_EMAIL_APP_URL', 'https://email.ladill.com'), + 'footer_account' => 'a Ladill Email account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'email.ladill.com', + ], + 'qrplus' => [ + 'name' => 'Ladill QR Plus', + 'logo' => 'ladillqrplus-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_QR_APP_URL', 'https://qrplus.ladill.com'), + 'footer_account' => 'a Ladill QR Plus account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'qrplus.ladill.com', + ], + 'events' => [ + 'name' => 'Ladill Events', + 'logo' => 'ladillevents-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_EVENTS_APP_URL', 'https://events.ladill.com'), + 'footer_account' => 'a Ladill Events account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'events.ladill.com', + ], + 'transfer' => [ + 'name' => 'Ladill Transfer', + 'logo' => 'ladilltransfer-logo-email.png', + 'logo_class' => 'email-logo email-logo-transfer', + 'app_url' => env('LADILL_TRANSFER_APP_URL', 'https://transfer.ladill.com'), + 'footer_account' => 'a Ladill Transfer account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'transfer.ladill.com', + ], + 'mini' => [ + 'name' => 'Ladill Mini', + 'logo' => 'ladillmini-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_MINI_APP_URL', 'https://mini.ladill.com'), + 'footer_account' => 'a Ladill Mini account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'mini.ladill.com', + ], + 'servers' => [ + 'name' => 'Ladill Servers', + 'logo' => 'ladillservers-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_SERVERS_APP_URL', 'https://servers.ladill.com'), + 'footer_account' => 'a Ladill Servers account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'servers.ladill.com', + ], + ], +]; diff --git a/public/images/logo/ladillmini-logo-email.png b/public/images/logo/ladillmini-logo-email.png new file mode 100644 index 0000000..c22d791 Binary files /dev/null and b/public/images/logo/ladillmini-logo-email.png differ diff --git a/resources/views/mail/notifications/domain-verified.blade.php b/resources/views/mail/notifications/domain-verified.blade.php new file mode 100644 index 0000000..1db6f71 --- /dev/null +++ b/resources/views/mail/notifications/domain-verified.blade.php @@ -0,0 +1,90 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'domains']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'domains']) +@endsection + +@section('content') +
Domain Verified!
+{{ $domain->host }} is now active
++ Great news! Your domain {{ $domain->host }} has been successfully verified + and is now fully active on Ladill. +
+ +What's Been Set Up
+
+
|
+ ||
+
|
+ ||
+
|
+
+ What's next? You can now: +
+ +
+ Manage Domain
+
+ Create Email Address
+
📋 Programme Outline
diff --git a/resources/views/mail/notifications/hosting-activated.blade.php b/resources/views/mail/notifications/hosting-activated.blade.php new file mode 100644 index 0000000..4e38851 --- /dev/null +++ b/resources/views/mail/notifications/hosting-activated.blade.php @@ -0,0 +1,64 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') ++ Your hosting plan has been activated and is ready to use. You can now start uploading files, + creating databases, and hosting your websites. +
+ +{{ $planName }}
+Your hosting is live and ready
+|
+ Plan + {{ $planName }} + |
+
|
+ Domain + {{ $domainName }} + |
+
|
+ Activation Date + {{ $activationDate }} + |
+
|
+ Status + Active + |
+
+ Manage Hosting +
+ + + ++ Getting started: Access your control panel to manage files, databases, email accounts, and more. +
+@endsection diff --git a/resources/views/mail/notifications/hosting-developer-added.blade.php b/resources/views/mail/notifications/hosting-developer-added.blade.php new file mode 100644 index 0000000..5a0048e --- /dev/null +++ b/resources/views/mail/notifications/hosting-developer-added.blade.php @@ -0,0 +1,47 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') ++ {{ $ownerName }} granted you developer access to the following Ladill hosting environment{{ count($accountLabels) === 1 ? '' : 's' }}: +
+ ++ You now have full access to the hosting panel for {{ count($accountLabels) === 1 ? 'this account' : 'these accounts' }} — manage files, domains, databases, SSL, cron jobs, and more. +
+ ++ To connect via SSH or SFTP, add your public key from the hosting panel Settings page after signing in. +
+ + @if ($setupUrl) + ++ Use the button above to activate your account before signing in. +
+ @else + + @endif + ++ After signing in, open your dashboard here: {{ $dashboardUrl }} +
+@endsection diff --git a/resources/views/mail/notifications/hosting-expiring.blade.php b/resources/views/mail/notifications/hosting-expiring.blade.php new file mode 100644 index 0000000..dce0a10 --- /dev/null +++ b/resources/views/mail/notifications/hosting-expiring.blade.php @@ -0,0 +1,56 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +Hosting Expiring Soon
+{{ $account->primary_domain ?: $account->username }}
++ Your hosting account for {{ $account->primary_domain ?: $account->username }} will expire soon. + Renew before the expiry date to keep your website online and avoid service interruption. +
+ +Account Details
+Domain / Account
+{{ $account->primary_domain ?: $account->username }}
+Expiration Date
+{{ $account->expires_at?->format('F j, Y') ?? 'N/A' }}
+Days Remaining
++ {{ $daysRemaining }} days +
+
+ What happens if hosting expires?
+ Your website will go offline. Your files are kept for a grace period, but the site will not be accessible until you renew.
+
+ Renew Hosting +
+ + + ++ If you have wallet auto-renew enabled and sufficient balance, your plan may renew automatically on the expiry date. +
+@endsection diff --git a/resources/views/mail/notifications/hosting-suspended.blade.php b/resources/views/mail/notifications/hosting-suspended.blade.php new file mode 100644 index 0000000..f63ca41 --- /dev/null +++ b/resources/views/mail/notifications/hosting-suspended.blade.php @@ -0,0 +1,59 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +Account Suspended
+Action Required
++ We regret to inform you that your hosting account has been suspended. This may be due to an overdue payment, terms of service violation, or other issues that require your attention. +
+ +Account Details
+Account
+{{ $account->domain ?? $account->name ?? 'Hosting Account' }}
+Suspended On
+{{ $account->suspended_at?->format('F j, Y') ?? now()->format('F j, Y') }}
+Reason
+{{ $reason }}
+Status
+Suspended
+
+ What happens next?
+ Your website and services are currently offline. To restore access, please resolve the issue by logging into your dashboard or contacting our support team.
+
+ Go to Dashboard +
+ + + ++ If you believe this suspension was made in error, please contact our support team immediately. We're here to help resolve this issue as quickly as possible. +
+@endsection diff --git a/resources/views/mail/notifications/layout.blade.php b/resources/views/mail/notifications/layout.blade.php new file mode 100644 index 0000000..3662c00 --- /dev/null +++ b/resources/views/mail/notifications/layout.blade.php @@ -0,0 +1,404 @@ + + + + + + +|
+
+ {{-- Header with Logo --}}
+
+
+ @hasSection('email-header')
+ @yield('email-header')
+ @else
+ @include('mail.partials.brand-header', ['brand' => 'ladill'])
+ @endif
+
+
+ @hasSection('icon-header')
+ @yield('icon-header')
+ @endif
+
+ {{-- Email Body --}}
+
+ @yield('content')
+
+
+ {{-- Footer --}}
+
+ |
+
⚠️ SSL Certificate Expiring
+{{ $daysUntilExpiry }} days remaining
++ Your SSL certificate for {{ $domain->host }} is expiring soon. + While we attempt to auto-renew certificates, please verify your domain is still properly configured. +
+ +Certificate Details
+Domain
+{{ $domain->host }}
+Status
+Expiring Soon
+Expires
+{{ $expiresAt ? $expiresAt->format('F j, Y') : 'Unknown' }}
+Days Remaining
+{{ $daysUntilExpiry }} days
++ What you should check: +
+ ++ If everything looks correct, no action is needed. We'll automatically attempt to renew your certificate. + If renewal fails, we'll notify you immediately. +
+@endsection diff --git a/resources/views/mail/notifications/ssl-provisioned.blade.php b/resources/views/mail/notifications/ssl-provisioned.blade.php new file mode 100644 index 0000000..8a3fa31 --- /dev/null +++ b/resources/views/mail/notifications/ssl-provisioned.blade.php @@ -0,0 +1,64 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +🔒 SSL Certificate Active
+{{ $domain->host }} is now secure
++ Your SSL certificate for {{ $domain->host }} has been successfully provisioned. + Your website is now accessible via HTTPS and visitors will see the secure padlock icon. +
+ +Certificate Details
+Domain
+{{ $domain->host }}
+Status
+Active
+Expires
+{{ $expiresAt ? $expiresAt->format('F j, Y') : 'Auto-renewing' }}
+Secure URL
+ ++ What this means: +
+ ++ Your SSL certificate will automatically renew before it expires. No action is required from you. +
+@endsection diff --git a/resources/views/mail/partials/brand-footer.blade.php b/resources/views/mail/partials/brand-footer.blade.php new file mode 100644 index 0000000..6f6b66a --- /dev/null +++ b/resources/views/mail/partials/brand-footer.blade.php @@ -0,0 +1,20 @@ +@php + $brandKey = $brand ?? 'ladill'; + $brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill')); + $appBase = rtrim((string) ($brandConfig['app_url'] ?? config('app.url')), '/'); + $dashboardPath = $brandConfig['dashboard_path'] ?? '/'; + $accountBase = rtrim((string) ($brandConfig['account_url'] ?? config('mail_brands.account_url', 'https://account.ladill.com')), '/'); + $supportUrl = $brandConfig['support_url'] ?? $accountBase.'/support-tickets'; + $homeLabel = $brandConfig['home_label'] ?? parse_url($appBase, PHP_URL_HOST) ?: 'ladill.com'; +@endphp + + + diff --git a/resources/views/mail/partials/brand-header.blade.php b/resources/views/mail/partials/brand-header.blade.php new file mode 100644 index 0000000..f6bce5a --- /dev/null +++ b/resources/views/mail/partials/brand-header.blade.php @@ -0,0 +1,7 @@ +@php + $brandKey = $brand ?? 'ladill'; + $brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill')); + $assetBase = rtrim((string) ($brandConfig['asset_url'] ?? config('app.url')), '/'); + $logoClass = trim((string) ($brandConfig['logo_class'] ?? 'email-logo')); +@endphp +