I use the Symfony 1.4 email program, where I create the various bits needed for email and then send them using:
$this->getMailer()->composeAndSend($sender, $recipient, $subject, $body);
In the body of the letter, I need to use the variables generated in the action, so right now I can do this in my action:
$body = 'Your username is '.$username.' and this is the email body.';
Does anyone know of an elegant way to store / organize various email bodies instead of writing them so directly to my action? I will have many email templates and will also have them in several languages.
I found an old Askeet tutorial that discusses this, but it seems a bit dated with the new SwiftMailer integration based on symfony 1.4, and the SwiftMailer documentation itself is not very clear.
Thank.
source
share