emaily na aktivaciu uctu

This commit is contained in:
Andrej
2025-11-04 17:27:44 +01:00
parent 3f2d2c6438
commit 7feba39bc9
4 changed files with 76 additions and 5 deletions

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class UserAccountActivated extends Mailable
{
use Queueable, SerializesModels;
private string $name;
/**
* Create a new message instance.
*/
public function __construct(string $name)
{
$this->name = $name;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'User Account Activated',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.activation.completed',
with: [
"name" => $this->name,
]
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@@ -14,15 +14,15 @@ class UserRegistrationCompleted extends Mailable
use Queueable, SerializesModels;
private string $name;
private string $password;
private string $activation_token;
/**
* Create a new message instance.
*/
public function __construct(string $name, string $password)
public function __construct(string $name, string $activation_token)
{
$this->name = $name;
$this->password = $password;
$this->activation_token = $activation_token;
}
/**
@@ -44,7 +44,7 @@ class UserRegistrationCompleted extends Mailable
view: 'mail.registration.completed',
with: [
"name" => $this->name,
"password" => $this->password
"activation_token" => $this->activation_token
]
);
}

View File

@@ -0,0 +1,8 @@
@include("parts.header")
<p>Vážená/ý {{ $name }},</p>
<p>úspešne ste aktivovali váš účet!</p>
<br />
<p>s pozdravom</p>
<p>Systém ISOP UKF</p>
@include("parts.footer")

View File

@@ -3,7 +3,12 @@
<p>vaša registrácia do systému ISOP UKF prebehla úspešne!</p>
<br />
<p>Vaše heslo je: <em>{{ $password }}</em></p>
<p>Aktivujte účet pomocou nasledujúceho linku:</p>
<br />
<p>
<a
href="{{ config('app.frontend_url') }}/account/activation/{{ $activation_token }}">{{ config('app.frontend_url') }}/account/activation/{{ $activation_token }}</a>
</p>
<br />