1. Go to this page and download the library: Download bjnstnkvc/mail-components library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bjnstnkvc / mail-components example snippets
/**
* Create a new message instance.
*/
public function __construct()
{
$this->theme = 'mail-components';
}
class VerificationMail extends Mailable
{
/**
* Create a new message instance.
*/
public function __construct(public User $user, public string $email, public string $token)
{
//
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
from : new Address('[email protected]', 'Example'),
subject: 'Verify Email',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'mail.verification-mail',
);
}
}
mail_components.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.