-
Notifications
You must be signed in to change notification settings - Fork 29
Feat/email building with attachments #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
a2d50a1
Style: Update constructor
tatevikg1 216978e
UserPersonalizer
tatevikg1 968044a
Use correct mailer
tatevikg1 78146e5
refactor
tatevikg1 975b418
RateLimitedCampaignMailer
tatevikg1 9b45ab3
PlaceholderValueResolverInterface
tatevikg1 8ed86ed
FORWARDEDBY
tatevikg1 5bed8e2
ForwardValueResolver
tatevikg1 5fdae5b
PreferencesValueResolver
tatevikg1 9d07526
SignatureValueResolver
tatevikg1 de8f4a8
MailConstructor
tatevikg1 54368f1
Append footer and signature if not prsent
tatevikg1 3728a1a
Rename UserPersonalizer to MessagePlaceholderProcessor
tatevikg1 988ff0c
PatternResolver registration
tatevikg1 6fa0137
UserTrackValueResolver
tatevikg1 026fedb
NormalizePlaceholderKey
tatevikg1 6823f07
UserDataSupportingResolver
tatevikg1 1a83a77
UserPersonalizer for SubscriptionConfirmationMessageHandler
tatevikg1 cbdb3b2
supportingResolvers
tatevikg1 9ac9cae
EmailBuilder
tatevikg1 10e5fa5
MailConstructorInterface
tatevikg1 51d5542
FooterValueResolver
tatevikg1 6a2ae3c
applyCampaignHeaders
tatevikg1 86f02a2
Add missing configs
tatevikg1 93e95e4
AttachmentAdder
tatevikg1 fc63fa4
applyContentAndFormatting
tatevikg1 89ba6df
Autowire, autoregister
tatevikg1 5fd4e4a
applyContentAndFormatting
tatevikg1 c121aa2
separate base email builder
tatevikg1 244a545
Tests
tatevikg1 e34d359
Style
tatevikg1 3209e63
Ref
tatevikg1 507e2a3
return
tatevikg1 8e22349
Ref
tatevikg1 5ce44d6
Style
tatevikg1 5c65671
Ref: increment sentAs columns
tatevikg1 8647fcf
After review 0
tatevikg1 76f6665
Add tests
tatevikg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace PhpList\Core\Domain\Configuration\Model\Dto; | ||
|
|
||
| use PhpList\Core\Domain\Configuration\Model\OutputFormat; | ||
| use PhpList\Core\Domain\Messaging\Model\Dto\MessagePrecacheDto; | ||
| use PhpList\Core\Domain\Subscription\Model\Subscriber; | ||
|
|
||
| final class PlaceholderContext | ||
| { | ||
| public function __construct( | ||
| public readonly Subscriber $user, | ||
| public readonly OutputFormat $format, | ||
| public readonly ?MessagePrecacheDto $messagePrecacheDto = null, | ||
| public readonly string $locale = 'en', | ||
| private readonly ?string $forwardedBy = null, | ||
| private readonly ?int $messageId = null, | ||
| ) {} | ||
|
|
||
| public function isHtml(): bool | ||
| { | ||
| return $this->format === OutputFormat::Html; | ||
| } | ||
|
|
||
| public function isText(): bool | ||
| { | ||
| return $this->format === OutputFormat::Text; | ||
| } | ||
|
TatevikGr marked this conversation as resolved.
|
||
|
|
||
| public function forwardedBy(): ?string | ||
| { | ||
| return $this->forwardedBy; | ||
| } | ||
|
|
||
| public function messageId(): ?int | ||
| { | ||
| return $this->messageId; | ||
| } | ||
|
|
||
| public function getUser(): Subscriber | ||
| { | ||
| return $this->user; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace PhpList\Core\Domain\Configuration\Model; | ||
|
|
||
| enum OutputFormat: string | ||
| { | ||
| case Html = 'html'; | ||
| case Text = 'text'; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.