plainblack.com
Username Password
search
Bookmark and Share

KiMD-variant of SendNewsletters activity

When establishing a newsletter on our site we found that the current activity does not exactly fit our needs. That is why we slightly modified the default activity. I put it here just in case it may be useful to anyone else.

 

 

System Requirements

None

Release Notes for Version 1 (9/15/2009)

Changes:

  • Send out newsletter even if a newsletter has been sent within the last 24 hours (hardcoded limit in SQL query was removed).
  • Include extra head tags part of the newsletter template in HTML messages.
  • Do not add base directive in HTML header, which will break local links.


Diff against WebGUI::Workflow::Activity::SendNewsletters
:

< package WebGUI::Workflow::Activity::KimdSendNewsletters;
---
> package WebGUI::Workflow::Activity::SendNewsletters;
56c56
<         name=>"Newsletter versenden (KiMD-Variante)",
---
>         name=>$i18n->get("send activity name"),
82c82,83
<         from Newsletter_subscriptions order by assetId, userId");
---
>         from Newsletter_subscriptions where lastTimeSent < unix_timestamp() - 60*60*23
>         order by assetId, userId"); # only sending to people who haven't been sent to in the past 23 hours
138c139
<                 content     => $thread->get("content"),
---
>                 body        => $thread->get("body"),
189,203c190
<
<         if ($content !~ /<(?:html|body)/) {
<             my $head = $template->get('extraHeadTags');
<             $content = <<END_HTML;
< <html>
< <head>
< $head
< </head>
< <body>
< $content
< </body>
< </html>
< END_HTML
<         }
<         $mail->addHtmlRaw($content);
---
>         $mail->addHtml($content);

Comments
DownloadKimdSendNewsletters.pm KimdSendNewsletters.pm
LinksSupport
Statistics Downloads: 379
Views: 1716
Rating: 0
Updated: 9/15/2009
Keywords activity newsletter
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved