CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Auto generate HTML email of upcoming events
Pages: [1]

Author Topic: Auto generate HTML email of upcoming events  (Read 1219 times)

jamie

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 6
Auto generate HTML email of upcoming events
January 08, 2010, 09:49:48 am
I'm looking for a way to auto-generate HTML + text email messages of all upcoming events between certain dates.

We're running CiviCRM in Drupal. Drupal offers several options for doing this (e.g. http://drupal.org/project/sunmailer and http://drupal.org/project/relatedcontent). However, they are all node-dependent.

It seems like the easiest way to do this would be to create an RSS view that shows the events we want and then write some code that would transform it into HTML and a text version.

However, before digging into that, I wanted to see if anyone had other options that would require writing any code.

jamie

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Auto generate HTML email of upcoming events
January 08, 2010, 11:11:35 am

sunmailer is dependent on views, is it also dependent on nodes? if so, any chance we can get around that requirement? and just use the views integration of sunmailer directly?

you can also potentially use a url similar to:

http://sandbox.civicrm.org/civicrm/event/ical?reset=1&page=1&html=1&start=2010-01-01&end=2010-01-31&snippet=4

the civicrm function:

CRM/Event/BAO/Event.php, getCompleteInfo

pretty much gives you all the details u might need of an event

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jamie

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 6
Re: Auto generate HTML email of upcoming events
January 20, 2010, 03:16:35 pm
Unfortunately, sunmailer only works with node-based views :(.

The ical link gave me a lot of ideas though.

I think the answer is either to patch sunmailer or perhaps take an RSS or other machine readable view of events and transform it into html (e.g. http://sandbox.civicrm.org/civicrm/event/ical?reset=1&page=1&rss=1&start=2010-01-01&end=2010-01-31&snippet=4).

I'll keep this thread posted on what we do.
jamie

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Auto generate HTML email of upcoming events

This forum was archived on 2017-11-26.