PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Pure Text Notifications

  1. The email system that receives the notifications cannot display HTML emails, this is not a configurable option. Is it possible for gravity forms to send notifications in a text format and is it possible to format this output so that data in the forms is not randomly spaced and confusing?

    or alternatively adding the notification as a HTML attachment?

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  2. Currently emails are only sent as HTML. To send them as plain text you would have to edit the core plugin files and change it there. We do plan on adding a hook so it can be changed via a hook in a future release.

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  3. You could try using the wp_mail_content_type filter... check out the last comment: http://wordpress.org/support/topic/wp_mail_content_type?replies=5

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  4. CraigTommola
    Member

    @Zack Katz - have you tried this technique with any success? I just saw this, and will have to try it later when I'm working, just curious if this worked out for you or davidpg

    Thx
    CT

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  5. Don't know - haven't tried it. I would add the hook while hooking into the send notifications Gravity Forms hook.

    Posted 13 years ago on Tuesday September 21, 2010 | Permalink
  6. CraigTommola
    Member

    Is there a way to set it to send BOTH types? I'd like to use HTML on one page, TXT on another, for two different form functions.

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  7. There is...you want the header for Content-Type to be "multipart/alternative", then separate the text from the html with a boundary.

    It's complicated. You need to pass that with the $headers parameter for wp_mail().

    Here's more information:
    http://articles.sitepoint.com/article/advanced-email-php/4

    You should also check out how wp_mail() function works by looking at the source:
    http://core.trac.wordpress.org/browser/trunk/wp-mail.php

    Posted 13 years ago on Wednesday September 22, 2010 | Permalink
  8. Carl, can you explain where in the core files I would need to change this? My studio management software requires plain text emails. I'm kind of stuck right now, any help would be great.

    Posted 12 years ago on Thursday April 28, 2011 | Permalink
  9. You would edit common.php in the gravityforms plugin folder. Search for the wp_mail function call. Just above the line that calls wp_mail is a line that sets the Content-type for the email being sent to text/html. You need to change it to text/plain.

    Posted 12 years ago on Thursday April 28, 2011 | Permalink