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 CiviMail (Moderator: Piotr Szotkowski) »
  • How to mail HTML from external source
Pages: [1]

Author Topic: How to mail HTML from external source  (Read 524 times)

Onsemeliot

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.3 rc8
  • CMS version: Drupal 7.26
  • MySQL version: 5.1
  • PHP version: 5.4
How to mail HTML from external source
February 25, 2015, 09:25:50 am
We set up a Drupal page which loads an HTML table (via cURL in a php-enabled editor field) from an external server as daily menu:

http://d23148.ispservices.at/drupal/tageskarte

Now our customer (a cafe) wants to send this table as a newsletter to interested guests each day automatically. Can anyone give me a hint how I should load this code into a CiviMail mass mailer? Do I need to save it as a file to our server first and include it later on or can I somehow directly load it into a standardised mail which gets sent out to all subscribers each morning without any user input?

The external file is very basic HTML-code, generated by a php-file. The php-File on the foreign server always renders the actual daily menu. (Therefore the url stays the same even if the content changes every day.) The necessary CSS styles are applied from our Drupal style definitions. (Which are not active at the moment since they do not play well in CiviCRM yet. --> It breaks the admin menu and adds an other instance of it at the wrong place.)

I'm thankful for any pointers.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to mail HTML from external source
February 25, 2015, 09:28:59 am
You can create and send mailings using the API.
Try asking your question on the new CiviCRM help site.

Onsemeliot

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.3 rc8
  • CMS version: Drupal 7.26
  • MySQL version: 5.1
  • PHP version: 5.4
Re: How to mail HTML from external source
February 25, 2015, 09:50:09 am
Thank you for the fast reply, Coleman,

Which API should I search for? CiviMail? Or is it something more basic from CiviCRM itself? Could I use this even on a virtual server with no root access?

Can you post a link to the relevant documentation?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to mail HTML from external source
February 25, 2015, 11:05:09 am
You can use the api explorer on your own site to help you get the params right for the Mailing api.
For general info see http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
Try asking your question on the new CiviCRM help site.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How to mail HTML from external source
February 25, 2015, 05:31:39 pm
in case your drupal page could be rejigged as a drupal VIEWS page - there is the views token eileen cooked up so that drupal views could be the source of the content for a civimailing in case that approach is of any use to you
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Onsemeliot

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.4.3 rc8
  • CMS version: Drupal 7.26
  • MySQL version: 5.1
  • PHP version: 5.4
Re: How to mail HTML from external source
February 26, 2015, 06:54:14 am
Thank you for your tips. I will look into that as soon as possible. (Right now I need to deal with some strange mass mails derived from two of our CiviCRM installations which cause our mail server to be blacklisted ... --> Unfortunately somebody was able to use PHPIDS for sending spam from our server. I still don't get how people where even able to reach any script providing enough vulneribility for sending out tousands of spam mails each day since I don't know of any file publicly accessible, using the "test@test.com" address definded in the PHPIDS configuration file.)

Well the CiviCRM API seems to be quite powerful. If I manage to write an PHP script with all necessary actions for mailing these newsletters with the daily menu I should be able to use cron for actually triggering it. I just don't know yet what data I need to supply in order to generate a complete mailing with all functionality.
« Last Edit: February 27, 2015, 07:17:34 am by Onsemeliot »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • How to mail HTML from external source

This forum was archived on 2017-11-26.