Desacople e implementacion de email
This commit is contained in:
@ -60,8 +60,24 @@ return [
|
||||
$segmentos = json_decode(trim(file_get_contents($filename)));
|
||||
return $segmentos;
|
||||
},
|
||||
Slim\Views\Blade::class => function(Container $c) {
|
||||
return new Slim\Views\Blade(
|
||||
'email' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'emails.json'
|
||||
]);
|
||||
$emails = json_decode(trim(file_get_contents($filename)));
|
||||
return $emails->settings;
|
||||
},
|
||||
'emails' => function(Container $c) {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders.data'),
|
||||
'emails.json'
|
||||
]);
|
||||
$emails = json_decode(trim(file_get_contents($filename)));
|
||||
return $emails->emails;
|
||||
},
|
||||
ProVM\KI\Common\Alias\View::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\View(
|
||||
$c->get('folders.templates'),
|
||||
$c->get('folders.cache'),
|
||||
null,
|
||||
@ -91,5 +107,15 @@ return [
|
||||
$c->get('folders.data'),
|
||||
$c->get('folders.public')
|
||||
);
|
||||
},
|
||||
ProVM\KI\Common\Alias\Message::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\Message();
|
||||
},
|
||||
ProVM\KI\Common\Alias\Mailer::class => function(Container $c) {
|
||||
return new ProVM\KI\Common\Implementation\Mailer([
|
||||
'host' => $c->get('email')->host->name,
|
||||
'username' => $c->get('email')->user->name,
|
||||
'password' => $c->get('email')->user->password
|
||||
]);
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user