Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6224

Make emails with empty(-ish) HTML go out as text-only

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Currently, if you create an email with an 'empty' (content-wise, so possibly sporting <p> tags, <br /> tags,   entities, etc.) HTML part and non-empty text part, that email will show up as 'empty' in email clients showing the HTML part by default. Such a situation might occur when an email template has only a text part, for example.

      Possible fix: before sending an email, test for
      trim(CRM_Utils_String::htmlToText($html)) == ''
      and if true, send a text-only email (disregarding given contact's email preference).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                shot Piotr Szotkowski
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: