1 | <?php |
||
32 | final class EmailGenerator |
||
33 | { |
||
34 | /** |
||
35 | * @var TemplateEngineInterface |
||
36 | */ |
||
37 | private $templateEngine; |
||
38 | |||
39 | /** |
||
40 | * @var EmailAddress |
||
41 | */ |
||
42 | private $defaultFromEmailAddress; |
||
43 | |||
44 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * Create the Email Message that we can send. |
||
55 | * |
||
56 | * This is generated from two (twig) templates and an array with template data |
||
57 | * |
||
58 | * @param EmailAddress $fromEmailAddress The sender of the email |
||
59 | * @param EmailAddress $recipient The recipient of the email |
||
60 | * @param string $subject The subject of the email |
||
61 | * @param string $txtTemplatePath The path to the txt template e.g. |
||
62 | * mails/toConsumer/notify-consumer-new-proposal.txt.twig |
||
63 | * @param string $htmlTemplatePath The path to the txt template e.g. |
||
64 | * mails/toConsumer/notify-consumer-new-proposal.html.twig |
||
65 | * @param EmailTemplateViewModelInterface $emailTemplateViewModel The data that will be used to render the template |
||
66 | * @param EmailAddress[] $cc |
||
67 | * @param EmailAddress[] $bcc |
||
68 | * @param string[] $tagList Can be used for tracking email campaigns |
||
69 | */ |
||
70 | public function generateEmailMessage( |
||
100 | } |
||
101 |