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 (Moderator: Donald Lobo) »
  • How does CiviMail generate its plain-text component automatically?
Pages: [1]

Author Topic: How does CiviMail generate its plain-text component automatically?  (Read 930 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
How does CiviMail generate its plain-text component automatically?
June 28, 2010, 09:40:03 pm
I think it's great that CiviMail can now generate its own plain-text version, and don't mind the format.

However, a customer of mine wants to control the output more (move links from footnotes to inline).

Where is this process implemented in CiviMail?

I've had a dig through the recent CiviMail tickets but don't see any specific issue which looks like it's related.
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How does CiviMail generate its plain-text component automatically?
June 28, 2010, 09:45:56 pm
CRM/Mailing/BAO/Mailing.php
Code: [Select]
$this->templates['text'] = CRM_Utils_String::htmlToText( $this->templates['html'] );

=>
CRM/Utils/String.php CRM_Utils_String::htmlToText()

=>
packages/html2text/class/html2text.inc

=>
http://chuggnutt.com/html2text-source.php

Doesn't look like there are options to preserve links inline, but could be done by modifying the package directly.
« Last Edit: June 28, 2010, 09:50:30 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How does CiviMail generate its plain-text component automatically?

This forum was archived on 2017-11-26.