-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replaced SmtpTransport with EsmtpTransport
Signed-off-by: sergiu <[email protected]>
- Loading branch information
1 parent
47a49b1
commit 29a544e
Showing
11 changed files
with
147 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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 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,81 @@ | ||
<?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 config provide just default 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 extends 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' => 'sendmail', | ||
//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 over the Internet | ||
'tls' => null, | ||
], | ||
], | ||
], | ||
// option to log the SENT emails | ||
'log' => [ | ||
'sent' => getcwd() . '/log/mail/sent.log', | ||
], | ||
], | ||
]; |
This file contains 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 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 |
---|---|---|
|
@@ -21,9 +21,9 @@ $this->mailService->getMessage()->addTo("[email protected]"); | |
## Transport configuration | ||
|
||
`dot-mail` uses the `transport` key under the main `dot_mail` configuration key to select the email transport. | ||
It has four email transport classes available by default (`SmtpTransport`), one of which is to be added under the `dot_mail.transport` key for use. | ||
It has two email transport classes available (by default `sendmail`), one of which is to be added under the `dot_mail.transport` key for use. | ||
|
||
Sending email with the `Smtp` transport requires valid data for the values under `dot-mail.default.smtp_options`, which is only used in this case. | ||
Sending email with the `Esmtp` transport requires valid data for the values under `dot-mail.default.smtp_options`, which is only used in this case. | ||
|
||
> The configured path must be a writable directory | ||
|
This file contains 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 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 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 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.