Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit816ad7a

Browse files
[Mailer] Mailtrap sandbox changes
Suggested changes made as part of PRsymfony#61315.
1 parent5152f7f commit816ad7a

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
CHANGELOG
22
=========
33

4-
7.2
4+
7.4
55
---
66

7-
* Addthe bridge
7+
* Addcompatibility for Mailtrap's sandbox
88

9-
7.4
9+
7.2
1010
---
1111

12-
* Addcompatibility for Mailtrap's sandbox
12+
* Addthe bridge

‎src/Symfony/Component/Mailer/Bridge/Mailtrap/Transport/MailtrapApiTransport.php‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class MailtrapApiTransport extends AbstractApiTransport
3434
{
3535
privateconstHOST ='send.api.mailtrap.io';
3636
privateconstHEADERS_TO_BYPASS = ['from','to','cc','bcc','subject','content-type','sender'];
37-
protected ?string$inboxId =null;
37+
privateint$inboxId =0;
3838

3939
publicfunction__construct(
4040
#[\SensitiveParameter]privatestring$token,
@@ -50,9 +50,12 @@ public function __toString(): string
5050
return\sprintf('mailtrap+api://%s',$this->getEndpoint());
5151
}
5252

53-
publicfunctionsetInboxId(?string$inboxId):static
53+
/**
54+
* @return $this
55+
*/
56+
publicfunctionsetInboxId(mixed$inboxId):static
5457
{
55-
$this->inboxId =is_numeric($inboxId ) ?$inboxId :null;
58+
$this->inboxId =(int)$inboxId;
5659

5760
return$this;
5861
}

‎src/Symfony/Component/Mailer/Bridge/Mailtrap/Transport/MailtrapTransportFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function create(Dsn $dsn): TransportInterface
2929
if ('mailtrap+api' ===$scheme) {
3030
$host ='default' ===$dsn->getHost() ?null :$dsn->getHost();
3131
$port =$dsn->getPort();
32-
$inboxId =$dsn->getOption("inboxId");
32+
$inboxId =$dsn->getOption('inboxId');
3333

3434
return (newMailtrapApiTransport($user,$this->client,$this->dispatcher,$this->logger))->setHost($host)->setPort($port)->setInboxId($inboxId);
3535
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp