Commit 947cf27
committed
bug #53653 [Mailer] [Scaleway] Fix attachment handling (madbob)
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[Mailer] [Scaleway] Fix attachment handling
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
Here a pair of fixes for attachments' handling.
1) the attribute in the JSON payload is "attachments", not "attachment". Here you find the [reference documentation](https://www.scaleway.com/en/developers/api/transactional-email/#going-further)
2) as `bodyToString()` already returns a base64-encoded string, there is no need to re-encode it. I've replicated the behaviour [adopted by BrevoMailer](https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/Mailer/Bridge/Brevo/Transport/BrevoApiTransport.php#L129), that I also use with profit
Commits
-------
812d7a9 [Mailer] [Scaleway] Fix attachment handlingFile tree
2 files changed
+9
-3
lines changed- src/Symfony/Component/Mailer/Bridge/Scaleway
- Tests/Transport
- Transport
2 files changed
+9
-3
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments