PHP code example of lacodix / laravel-scoped-mail-config
1. Go to this page and download the library: Download lacodix/laravel-scoped-mail-config 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/ */
lacodix / laravel-scoped-mail-config example snippets
use Illuminate\Database\Eloquent\Model;
use Lacodix\LaravelScopedMailConfig\Concerns\HasMailConfig;
class Tenant extends Model implements HasMailConfig
{
public function getMailConfig($name): array {
return [
'transport' => 'smtp',
'host' => 'my.smtp.server',
'port' => 587,
'encryption' => null,
'username' => '[email protected]',
'password' => 'mypassword',
'timeout' => 60,
'local_domain' => null,
'from' => [
'address' => '[email protected]',
'name' => 'myname',
],
];
}
}