From 71965794dbf5eb24f887e65498ccfd0a542536af Mon Sep 17 00:00:00 2001 From: sergiu Date: Thu, 5 Dec 2024 16:20:18 +0200 Subject: [PATCH] documentation corrections Signed-off-by: sergiu --- config/mail.global.php | 81 ----------------------------------- docs/book/v5/configuration.md | 2 +- docs/book/v5/transports.md | 4 +- test/CommonTrait.php | 2 +- 4 files changed, 4 insertions(+), 85 deletions(-) delete mode 100644 config/mail.global.php diff --git a/config/mail.global.php b/config/mail.global.php deleted file mode 100644 index 10308ca..0000000 --- a/config/mail.global.php +++ /dev/null @@ -1,81 +0,0 @@ - [ - //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', - ], - ], -]; diff --git a/docs/book/v5/configuration.md b/docs/book/v5/configuration.md index 35faeeb..4c84742 100644 --- a/docs/book/v5/configuration.md +++ b/docs/book/v5/configuration.md @@ -23,7 +23,7 @@ $this->mailService->getMessage()->addTo("receiver@email.com"); `dot-mail` uses the `transport` key under the main `dot_mail` configuration key to select the email transport. 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 `Esmtp` 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 diff --git a/docs/book/v5/transports.md b/docs/book/v5/transports.md index 3a0d586..976586f 100644 --- a/docs/book/v5/transports.md +++ b/docs/book/v5/transports.md @@ -7,8 +7,8 @@ > Feel free to use any custom transport you desire, provided it implements the mentioned `TransportInterface`. -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()`. +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. -`Esmtp` connects to the configured SMTP host in order to handle sending emails. +`esmtp` connects to the configured SMTP host in order to handle sending emails. diff --git a/test/CommonTrait.php b/test/CommonTrait.php index f74833e..e42f8f7 100644 --- a/test/CommonTrait.php +++ b/test/CommonTrait.php @@ -88,7 +88,7 @@ private function generateConfig(): array 'username' => 'test', //the smtp authentication credential 'password' => 'testPassword', - 'tsl' => null, + 'tls' => null, ], ], ],