Send a generated page from template (tpl) by email?
  • Hello, is it possible use Newscoop internal mail system to send a genereted page from a template (tpl) to an email? I thik something like If a user that have a kind of profile like Admin or Editor is logged at publication, access his dashboard and there ai an option to send last issue to an registered email. It is generated by a template.

    For exemple, I make a email.tpl
    <html>
    <body>
    {{ list_articles }}
    <h1>{{ $gimme-article->name}}</h1>
    <p>{{$gimme->article->lead}}</p>
    <a href="{{ url options="article" }}"><strong>+ Read more</strong></a>
    {{/list_articles}}
    </body>
    </html>

    Is it possible or its necessary built a plugin?

    Thanks
  • 2 Comments sorted by
  • Hi, its not possible, you need a custom plugin for that. You cant use any gimme context in Newscoop emails as its not available there.

    Creating a plugin should be easy. Here is the guide: http://docs.sourcefabric.org/projects/newscoop-plugins/en/latest/plugin_design.html
  • Hi, thanks. 

    Is it possible use and adapt/reimplement some email Symfony Bundle for it, like azine/email-bundle or SwiftmailerBundle?

    Or is it easear make a new plugin? I ask it because I'm not a programmer.

    Thanks