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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Hook for changing uploaded files URL for mailing
Pages: [1]

Author Topic: Hook for changing uploaded files URL for mailing  (Read 437 times)

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Hook for changing uploaded files URL for mailing
November 01, 2013, 10:01:56 am
Hello, forgive the newbie question, but we will be doing our mailing creation on a server with a different URL than the uploaded files will be viewed on the web on, and it's different than the server that will be doing the mailing.  So I think I need to hard-code the URL for uploaded docs/images in the mailing.  Is there a hook available to allow changing the HTML data in the mailing body before it gets saved in the database?  I'm having problems finding it.

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: Hook for changing uploaded files URL for mailing
November 01, 2013, 10:18:45 am

check the alterMailParams hook

an example is here:

https://github.com/nysenate/Bluebird-CRM/blob/dev/modules/nyss_mail/nyss_mail.module

This seems to be coming up fairly frequently, where folks want the images and other urls to point to a different server. Ideally would be good to add this as a feature to core to make it easier and transparent to the end user

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

dmdude

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: None
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.2
Re: Hook for changing uploaded files URL for mailing
November 01, 2013, 10:47:04 am
Perfect, thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Hook for changing uploaded files URL for mailing

This forum was archived on 2017-11-26.