-
Notifications
You must be signed in to change notification settings - Fork 2
Issue #16: Implemented core and sending email functionality #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| local.php | ||
| *.local.php | ||
| mail.global.php | ||
|
alexmerlin marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,4 +22,4 @@ return [ | |
| ] | ||
| ], | ||
| ], | ||
| ]; | ||
| ]; | ||
|
alexmerlin marked this conversation as resolved.
|
||
|
alexmerlin marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| return [ | ||
| /** | ||
| * Dotkernel mail module configuration | ||
| * Note that many of these options can be set programmatically too, when sending mail messages actually that is | ||
| * what you'll usually do, these configs provide just defaults and options that remain the same for all mails | ||
| */ | ||
| 'dot_mail' => [ | ||
| //the key is the mail service name, this is the default one, which does not extend any configuration | ||
| 'default' => [ | ||
| //message configuration | ||
| 'message_options' => [ | ||
| //from email address of the email | ||
| 'from' => '', | ||
| //from name to be displayed instead of from address | ||
| 'from_name' => '', | ||
| //reply-to email address of the email | ||
| 'reply_to' => '', | ||
| //replyTo name to be displayed instead of the address | ||
| 'reply_to_name' => '', | ||
| //destination email address as string or a list of email addresses | ||
| 'to' => [], | ||
| //copy destination addresses | ||
| 'cc' => [], | ||
| //hidden copy destination addresses | ||
| 'bcc' => [], | ||
| //email subject | ||
| 'subject' => '', | ||
| //body options - content can be plain text, HTML | ||
| 'body' => [ | ||
| 'content' => '', | ||
| 'charset' => 'utf-8', | ||
| ], | ||
| //attachments config | ||
| 'attachments' => [ | ||
| 'files' => [], | ||
| 'dir' => [ | ||
| 'iterate' => false, | ||
| 'path' => 'data/mail/attachments', | ||
| 'recursive' => false, | ||
| ], | ||
| ], | ||
| ], | ||
| /** | ||
| * the mail transport to use can be any class implementing | ||
| * Symfony\Component\Mailer\Transport\TransportInterface | ||
| * | ||
| * for standard mail transports, you can use these aliases: | ||
| * - sendmail => Symfony\Component\Mailer\Transport\SendmailTransport | ||
| * - esmtp => Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport | ||
| * | ||
| * defaults to sendmail | ||
| **/ | ||
| 'transport' => 'esmtp', | ||
| //options that will be used only if esmtp adapter is used | ||
| 'smtp_options' => [ | ||
| //hostname or IP address of the mail server | ||
| 'host' => '', | ||
| //port of the mail server - 587 or 465 for secure connections | ||
| 'port' => 587, | ||
| 'connection_config' => [ | ||
| //the smtp authentication identity | ||
| 'username' => '', | ||
| //the smtp authentication credential | ||
| 'password' => '', | ||
| //to disable auto_tls set tls key to false | ||
| //it's not recommended to disable TLS while connecting to an SMTP server | ||
| 'tls' => null, | ||
| ], | ||
| ], | ||
| ], | ||
| // option to log the SENT emails | ||
| 'log' => [ | ||
| 'sent' => getcwd() . '/log/mail/sent.log', | ||
| ], | ||
| ], | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use Dot\Twig\Extension\DateExtension; | ||
| use Dot\Twig\Extension\TranslationExtension; | ||
| use Laminas\ServiceManager\Factory\InvokableFactory; | ||
| use Mezzio\Template\TemplateRendererInterface; | ||
| use Mezzio\Twig\TwigEnvironmentFactory; | ||
| use Mezzio\Twig\TwigRendererFactory; | ||
| use Twig\Environment; | ||
|
|
||
| return [ | ||
| 'dependencies' => [ | ||
| 'factories' => [ | ||
| DateExtension::class => InvokableFactory::class, | ||
| Environment::class => TwigEnvironmentFactory::class, | ||
| TemplateRendererInterface::class => TwigRendererFactory::class, | ||
| TranslationExtension::class => InvokableFactory::class, | ||
| ], | ||
| ], | ||
| 'debug' => false, | ||
| 'templates' => [ | ||
| 'extension' => 'html.twig', | ||
| ], | ||
| 'twig' => [ | ||
| 'assets_url' => '/', | ||
| 'assets_version' => null, | ||
| 'auto_reload' => true, | ||
| 'autoescape' => 'html', | ||
| 'cache_dir' => 'data/cache/twig', | ||
| 'extensions' => [ | ||
| DateExtension::class, | ||
| TranslationExtension::class, | ||
| ], | ||
| 'globals' => [ | ||
| 'appName' => $app['name'] ?? '', | ||
| ], | ||
| 'optimizations' => -1, | ||
| 'runtime_loaders' => [], | ||
| // 'timezone' => '', | ||
| ], | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.