- Added a new Email defintion (which will soon see it's components changed)
- Added a new post-install script for composer which adds a project skeleton "ready to use". - Error 500 are now handled properly in production; waiting to see if adjustements will be required before adding other code pages.
This commit is contained in:
1 parent
09b3e47c19
commit
01bb926ca7
30 files changed
+887
-2
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use TheBugs\Email\EmailConfiguration,
|
||||
TheBugs\Email\MailerInterface,
|
||||
TheBugs\Email\SwiftMailer;
|
||||
|
||||
return [
|
||||
EmailConfiguration::class => function($c) {
|
||||
$email = new EmailConfiguration( EmailConfiguration::AUTH_TYPE_SMTP );
|
||||
$email->smtpHost = getenv('SMTP_HOST');
|
||||
$email->smtpPort = getenv('SMTP_PORT');
|
||||
$email->smtpUsername = getenv('SMTP_USERNAME');
|
||||
$email->smtpPassword = getenv('SMTP_PASSWORD');
|
||||
$email->smtpUseTLS = getenv('SMTP_TLS');
|
||||
$email->toAddress = getenv("TO_EMAIL");
|
||||
$email->fromAddress = getenv("FROM_EMAIL");
|
||||
$email->fromName = getenv("FROM_NAME");
|
||||
return $email;
|
||||
},
|
||||
|
||||
MailerInterface::class => autowire(SwiftMailer::class),
|
||||
];
|
||||
Reference in new issue
Block a user