Support » Plugin: Contact Form 7 » Contact Form 7

  • Resolved Sweaver67

    (@sweaver67)


    I added some html tags to the mail that gets sent out, and they are showing in the email body. “Use HTML content type” is checked. Also, I am using Mail (2) and the same issue occurs. For example,

    <p>From: Kevin <email@gmail.com><br />
    Subject: Test Subject</p>
    <p>The following message from your website.</p>
    <p>First Name: Kevin<br />
    Last Name: Kevin<br /></p>

    etc.

    Obviously I would prefer to not see the <p> or
    tags 🙂

    https://wordpress.org/plugins/contact-form-7/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Sweaver67

    (@sweaver67)

    Apologies buzztone. I work with Kevin and he was having issues posting his version of this event. Evidently his browser was NOT giving him a confirmation that his post was working so he asked me to do it. We really are hoping someone has experienced this…

    Yep, when I posted my message it redirected to the forum page with the main content blank. On refresh the thread didn’t appear in the list. Thanks Shane for posting. Hopefully someone here has some insight.

    Also, this is showing in the header info, even though “Use HTML Content type” is selected

    Content-Type: text/plain; charset=UTF-8

    To further add information, changing $use_html = true doesn’t help:

    private function compose( $send = true ) {
    		$template = $this->template;
    		$use_html = (bool) $template['use_html'];
                    [...]
    }
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use?

    Akismet
    Category Posts in Custom Menu
    Column Shortcodes
    Contact Form 7
    Display Widgets
    Genesis eNews Extended
    Genesis Simple Edits
    Google XML Sitemaps
    Really Simple CAPTCHA
    Redirection
    Regenerate Thumbnails
    Rich Text Excerpts
    Simple Social Icons
    WordPress Importer
    WP Google Map Plugin

    Thanks for getting back with us. It’s a Genesis v2.0.2 theme.

    Also, this is showing in the header info,

    Can you post an entire email with all headers.

    Thanks Jason.

    Delivered-To: email@removed.com
    Received: by 10.202.232.71 with SMTP id f68csp45666oih;
            Fri, 23 Oct 2015 22:37:51 -0700 (PDT)
    X-Received: by 10.202.195.208 with SMTP id t199mr16572829oif.117.1445665071205;
            Fri, 23 Oct 2015 22:37:51 -0700 (PDT)
    Return-Path: <removed@gator4011.hostgator.com>
    Received: from gator4011.hostgator.com (gator4011.hostgator.com. [192.185.4.22])
            by mx.google.com with ESMTPS id bj4si14413940oec.48.2015.10.23.22.37.51
            for <email@removed.com>
            (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
            Fri, 23 Oct 2015 22:37:51 -0700 (PDT)
    Received-SPF: pass (google.com: domain of removed@gator4011.hostgator.com designates 192.185.4.22 as permitted sender) client-ip=192.185.4.22;
    Authentication-Results: mx.google.com;
           spf=pass (google.com: domain of removed@gator4011.hostgator.com designates 192.185.4.22 as permitted sender) smtp.mailfrom=removed@gator4011.hostgator.com
    Received: from removed by gator4011.hostgator.com with local (Exim 4.85)
    	(envelope-from <removed@gator4011.hostgator.com>)
    	id 1ZprWX-0003No-Kh; Sat, 24 Oct 2015 00:37:49 -0500
    To: email@removed.com
    Subject: Test Email
    X-PHP-Script: removed2.com/index.php for 121.54.58.242
    Date: Sat, 24 Oct 2015 05:37:49 +0000
    From: Kevin <wordpress@removed2.com>
    Message-ID: <b67ff6665574408b2dd7bc17d9d8fe9f@removed.com>
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
    Reply-To: email@removed.com
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
    X-AntiAbuse: Primary Hostname - gator4011.hostgator.com
    X-AntiAbuse: Original Domain - gmail.com
    X-AntiAbuse: Originator/Caller UID/GID - [31366 500] / [47 12]
    X-AntiAbuse: Sender Address Domain - gator4011.hostgator.com
    X-BWhitelist: no
    X-Source-IP:
    X-Exim-ID: 1ZprWX-0003No-Kh
    X-Source: /opt/php54/bin/php-cgi
    X-Source-Args: /opt/php54/bin/php-cgi /home2/removed/public_html/removed2.com/index.php
    X-Source-Dir: removed.com:/public_html/removed2.com
    X-Source-Sender:
    X-Source-Auth: removed
    X-Email-Count: 1
    X-Source-Cap: bWV0YW5vbWU7bWV0YW5vbWU7Z2F0b3I0MDExLmhvc3RnYXRvci5jb20=

    Well Content-Type: text/plain; charset=UTF-8 is obviously your problem. I don’t know why PHPMailer is not receiving the text/html header.

    Do you have a plugin installed that modifies the email header? Perhaps your theme. If you just install my SMTP plugin (you don’t have to keep it or configure it) and look in the Diagnostic Test results, it will show if there are other plugins modifying the email headers when CF7 sends an email.

    https://wordpress.org/plugins/postman-smtp/

    There was a function in the theme! Good call!

    Specifically this one:

    add_filter( 'wp_mail_content_type', function($content_type){
    	return 'text/plain';
    });

    I guess that would screw it up 😀

    Thanks for your time.

    There was a function in the theme! Good call!

    Specifically this one:

    add_filter( 'wp_mail_content_type', function($content_type){
    	return 'text/plain';
    });

    I guess that would screw it up 😀

    Thanks for your time.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Contact Form 7’ is closed to new replies.