I think you have the right idea with the solution you mention.

For me, I store all my email templates as partials in the templates
directory of the module they are used in. Then in the action, using
Swift mailer, I simply do something like:

$mailContext = array('name' => $user->getFirstname());
$message->addPart($this->getPartial('registration/htmlWelcomeEmail',
$mailContext), 'text/html');

On Oct 8, 1:04 pm, HAUSa <[email protected]>
wrote:
> Hi all,
>
> What is in your opinion the best way to store an e-mail template?
> In one of my actions, when an e-mail has to be sent to the user, I
> want to grab a template and replace some values.
>
> My idea is to create a module called "emails" and use the template
> folder, but maybe there is a less dirty method?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to