Skip to content

Commit

Permalink
Merge pull request #67 from dotkernel/issue-60
Browse files Browse the repository at this point in the history
Cleaned config file and display from name correctly
  • Loading branch information
arhimede authored Nov 19, 2024
2 parents 2ac1823 + a784314 commit 7df2546
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 35 deletions.
14 changes: 1 addition & 13 deletions config/mail.global.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ return [
* defaults to sendmail
**/

'transport' => Symfony\Component\Mailer\Transport\Smtp\SmtpTransport::class,

// Uncomment the below line if you want to save a copy of all sent emails to a certain IMAP folder
// Valid only if the Transport is SMTP
//'save_sent_message_folder' => ['INBOX.Sent'],
'transport' => Symfony\Component\Mailer\Transport\SendmailTransport::class,

//message configuration
'message_options' => [
Expand Down Expand Up @@ -103,14 +99,6 @@ return [
'ssl' => 'tls',
]
],

//listeners to register with the mail service, for mail events
'event_listeners' => [
//[
//'type' => 'service or class name',
//'priority' => 1
//],
],
],
// option to log the SENT emails
'log' => [
Expand Down
7 changes: 0 additions & 7 deletions docs/book/v5/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ Sending email with the `Smtp` transport requires valid data for the values under

> The configured path must be a writable directory
```php
'file_options' => [
'path' => 'data/mail/output',
//'callback' => null,
],
```

## Logging configuration

Uncommenting the `dot-mail.log` key will save a copy of all sent emails' subject, recipient addresses, cc and bcc addresses alongside a timestamp.
Expand Down
2 changes: 1 addition & 1 deletion docs/book/v5/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

> Feel free to use any custom transport you desire, provided it implements the mentioned `TransportInterface`.
`Sendmail` is a wrapper over PHP's `mail()` function, and as such has a different behaviour on Windows than on *nix systems. Using sendmail on Windows **will not work in combination with** `addBcc()`.
PHP's `mail()` function is a wrapper over `Sendmail`, and as such has a different behaviour on Windows than on *nix systems. Using sendmail on Windows **will not work in combination with** `addBcc()`.

- Note: emails sent using the sendmail transport will be more often delivered to SPAM.

Expand Down
2 changes: 1 addition & 1 deletion src/Factory/MailServiceAbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected function createMessage(): Email

$from = $options->getFrom();
if (! empty($from)) {
$message->addFrom($from);
$message->addFrom($from, $options->getFromName());
}

$replyTo = $options->getReplyTo();
Expand Down
13 changes: 0 additions & 13 deletions test/CommonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ private function generateConfig(): array
**/
'transport' => SmtpTransport::class,

// Uncomment the below line if you want to save a copy of all sent emails to a certain IMAP folder
// Valid only if the Transport is SMTP
// 'save_sent_message_folder' => ['INBOX.Sent'],

// Uncomment the below line if you want to save a copy of all sent emails to a certain IMAP folder
// Valid only if the Transport is SMTP
'save_sent_message_folder' => ['INBOX.Sent'],
'message_options' => [
Expand Down Expand Up @@ -106,14 +101,6 @@ private function generateConfig(): array
'ssl' => 'tls',
],
],

//listeners to register with the mail service, for mail events
'event_listeners' => [
//[
//'type' => 'service or class name',
//'priority' => 1
//],
],
],
// option to log the SENT emails
'log' => [
Expand Down

0 comments on commit 7df2546

Please sign in to comment.