This issue has come up before. I think someone suggested have a module
just for the emails. Seems like a good idea.


On Oct 8, 3:19 pm, HAUSa <[email protected]>
wrote:
> Ok, thx Alex, but I prefer not to use the database for this. In my
> opinion, the DB is only ment for user generated content storage.
>
> Martin, your answer is not a solution to my problem. You use $body =
> "the body", so my question still remains. Where do I leave the HTML e-
> mail template? I don't want to paste that whole code in the action.
>
> On 8 okt, 20:41, Martin Ibarra Cervantes <[email protected]>
> wrote:
>
>
>
> > hi, i use swift
>
> > $transport = 
> > Swift_SmtpTransport::newInstance(sfConfig::get('app_correo_hostname'),sfCon 
> > fig::get('app_correo_puerto'))
> >                         ->setUsername(sfConfig::get('app_correo_usuario'))
> >                         ->setPassword(sfConfig::get('app_correo_password')) 
> > ;
>
> >                 $mailer = Swift_Mailer::newInstance($transport);        
> >                 $body = "the body";          
> >                 $subject = "Validacion de Cuenta, Mis Retratos.";
> >                 $message   = Swift_Message::newInstance($subject)
> >                 ->setFrom(array(sfConfig::get('app_correo_usuario', 'Mis 
> > Retratos')))
> >                 ->setTo(array($this->form->getValue('correo')))        
> >                 ->setBody($body);
> >                 $mailer->send($message);            
> > its very single.
>
> > On Thu, Oct 8, 2009 at 10:41 AM, Alexandru-Emil Lupu
>
> > <[email protected]> wrote:
> > > What i have done was to implement swift mailer, create a component that
> > > handles the emails and parser, and all the email templates stored into
> > > database as
>
> > > Subject, Html, plain ...
>
> > > Unfortunatelly, I cannot reveal the code ...
> > > Alecs
>
> > > On Thu, Oct 8, 2009 at 8: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!
>
> > > --
> > > As programmers create bigger & better idiot proof programs, so the 
> > > universe
> > > creates bigger & better idiots!
> > > I am on web:  http://www.alecslupu.ro/
> > > I am on twitter:http://twitter.com/alecslupu
> > > I am on linkedIn:http://www.linkedin.com/in/alecslupu
> > > Tel: (+4)0748.543.798
--~--~---------~--~----~------------~-------~--~----~
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