Skip to content

Commit c1082f2

Browse files
committed
bug #59836 [Mailer][Postmark] Set CID for attachments when it exists (IssamRaouf)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Mailer][Postmark] Set CID for attachments when it exists | Q | A | ------------- | --- | Branch? | 6.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix #59819 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 83b0491 [Mailer][Postmark] Set CID for attachments when it exists
2 parents 7c515b2 + 83b0491 commit c1082f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Mailer/Bridge/Postmark/Transport/PostmarkApiTransport.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private function getAttachments(Email $email): array
147147
];
148148

149149
if ('inline' === $disposition) {
150-
$att['ContentID'] = 'cid:'.$filename;
150+
$att['ContentID'] = 'cid:'.($attachment->hasContentId() ? $attachment->getContentId() : $filename);
151151
}
152152

153153
$attachments[] = $att;

0 commit comments

Comments
 (0)