Skip to content

Commit f53b221

Browse files
authored
refactor(mail): correct SMTP defaults and config handling (#1772)
1 parent 9ac7b95 commit f53b221

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/mail/src/Attachment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function fromFilesystem(string $path, ?string $name = null, ?strin
6161
$path = Path\normalize($path);
6262

6363
if (! Filesystem\is_file($path)) {
64-
throw new FileAttachmentWasNotFound($path);
64+
throw FileAttachmentWasNotFound::forFilesystemFile($path);
6565
}
6666

6767
return new self(

packages/mail/src/Transports/Postmark/PostmarkConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
public function createTransport(): TransportInterface
5454
{
5555
return new PostmarkTransportFactory()->create(new Dsn(
56-
scheme: PostmarkConnectionScheme::API->value,
56+
scheme: $this->scheme->value,
5757
host: $this->host ?? 'default',
5858
user: $this->key,
5959
port: $this->port,

packages/mail/src/mail.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'smtps' => SmtpScheme::SMTPS,
2121
'smtp' => SmtpScheme::SMTP,
2222
},
23-
host: env('MAIL_SMTP_HOST', default: '127.0.0.0'),
23+
host: env('MAIL_SMTP_HOST', default: '127.0.0.1'),
2424
port: env('MAIL_SMTP_PORT', default: 2525),
2525
username: env('MAIL_SMTP_USERNAME', default: ''),
2626
password: env('MAIL_SMTP_PASSWORD', default: ''),

0 commit comments

Comments
 (0)