WordPress.org

Forums

Contact Form 7
Not getting "from" email? (26 posts)

  1. npacademy
    Member
    Posted 1 year ago #

    Hi,

    When submitting my email in the required field "your email" set up as default in the form, I don't get the from address. The from address is just the to email as well.

    The header is setup as: [your-name] <[your-email]>

    It corresponds with the field. The mail body shows From: [your-name] <[your-email]> and receives the name, but no email.

    The actual to box uses my details - eg the website name and website email address.

    Any fixes?

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

  2. buzztone
    Member
    Posted 1 year ago #

    Please include a link to your Contact Form 7 form plus all your input in the Form and Mail sections of the CF7 interface. If others here are able to understand your actual problem, they may be able and willing to offer a possible solution.

  3. npacademy
    Member
    Posted 1 year ago #

    Ok - link: http://www.naturettl.com/contact-test

    FORM:

    <p>Your Name (required)<br />
        [text* your-name] </p>
    
    <p>Your Email (required)<br />
        [email* your-email] </p>
    
    <p>Subject<br />
        [text your-subject] </p>
    
    <p>Your Message<br />
        [textarea your-message] </p>
    
    <p>[checkbox checkbox-592 "I would like to receive the latest articles by signing up to the Nature TTL fortnightly newsletter."]</p>
    
    <p>[submit "Send"]</p>

    Mail

    To: - my email address, not posting in here -
    From: [your-name] <[your-email]>
    Subject: [your-subject]

    Message body
    From: [your-name] <[your-email]>
    Subject: [your-subject]

    Message Body:
    [your-message]

    --
    Newsletter: [checkbox-592]

    This e-mail was sent from the Nature TTL contact form.

  4. buzztone
    Member
    Posted 12 months ago #

    Your form content all looks fine. I suspect your host may restrict allowable From email addresses.

  5. npacademy
    Member
    Posted 12 months ago #

    I've asked my host, and they said they have no restrictions. It must be the plugin.

  6. buzztone
    Member
    Posted 12 months ago #

    Suggest you test your form using some specific From: email addresses.

    The default From: [your-name] <[your-email]> is very useful. But you need hosting that allows any email to be used as the From: email. For some hosts the From Email Address needs to be a valid email on that domain.

    You can avoid using the customer input Email address as the From address by including the collected email address as a mailto: link in the body of the email.

  7. npacademy
    Member
    Posted 12 months ago #

    They said they do allow any email address.
    And I've included the collected address in the body, but it doesn't appear there either.

    It shows the name, but no email address.

  8. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 12 months ago #

    @npacademy are you talking about From: [your-name] <[your-email]> in the Message body, not in the From field in the left side?

  9. npacademy
    Member
    Posted 12 months ago #

    It's in both of them (see above post I posted the info from each section).

    It's not appearing in the message body, nor the header as it should.

  10. Kaspars
    Member
    Posted 12 months ago #

    @npacademy Are you saying that you are seeing all form values except for [your-email] being included in the email you receive?

  11. npacademy
    Member
    Posted 12 months ago #

    Yes - this is what I see from the test message you just sent.

    http://postimg.org/image/jga929yll/
    http://s28.postimg.org/8zgwdeikt/Screen_Shot_2014_06_04_at_12_50_24.png

    As you can see, your email is not included.
    The header from address is actually my own address and my company name, not yours. And your email isn't included in the body - just your name.

  12. Kaspars
    Member
    Posted 12 months ago #

    @npacademy -- you mentioned having this in "Body message":

    From: [your-name] <[your-email]>

    But I am not seeing it in the screenshot of the message that you just received. Could you please post a screenshot of the form settings.

  13. npacademy
    Member
    Posted 12 months ago #

    This is what I mean - it isn't in the body when it definitely is in the form.

    See here: http://s30.postimg.org/60o8ethbl/Screen_Shot_2014_06_04_at_13_12_33.png

  14. Kaspars
    Member
    Posted 12 months ago #

    Looks like something is stripping out the whole "From:" line from the body of the email. Can you please post the raw email content (including headers) of the message you received from me. Here is how to do it in Mail on OS X.

    Secondly, could you try adding another recipient email address to the form settings such as your personal gmail account. This way you'll make sure that it isn't your mail host stripping away random things.

  15. npacademy
    Member
    Posted 12 months ago #

    Return-path: <naturettl.com@web112.extendcp.co.uk>
    Envelope-to: info@naturettl.com
    Delivery-date: Wed, 04 Jun 2014 12:49:10 +0100
    Received: from mailscan7.extendcp.co.uk ([79.170.43.71] helo=mailscan1.extendcp.co.uk)
    	by mail140.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)
    	(Exim 4.80.1)
    	id 1Ws9gs-0001Mj-2i
    	for info@naturettl.com; Wed, 04 Jun 2014 12:49:10 +0100
    Received: from lb1.hi.local ([10.0.1.197] helo=mailscan0.hi.local)
    	by mailscan-g66.hi.local with esmtp (Exim 4.80.1)
    	(envelope-from <naturettl.com@web112.extendcp.co.uk>)
    	id 1Ws9gq-0001eu-AM
    	for info@naturettl.com; Wed, 04 Jun 2014 12:49:08 +0100
    Received: from lb1.hi.local ([10.0.1.197] helo=web112.extendcp.co.uk)
    	by mailscan0.hi.local with esmtps (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256)
    	(Exim 4.80.1)
    	(envelope-from <naturettl.com@web112.extendcp.co.uk>)
    	id 1Ws9gn-0002SR-HN
    	for info@naturettl.com; Wed, 04 Jun 2014 12:49:07 +0100
    Received: from naturettl.com by web112.extendcp.co.uk with local (Exim 4.80.1)
    	(envelope-from <naturettl.com@web112.extendcp.co.uk>)
    	id 1Ws9gi-0002oI-8I
    	for info@naturettl.com; Wed, 04 Jun 2014 12:49:00 +0100
    To: info@naturettl.com
    Subject: Testing form submissions
    Date: Wed, 4 Jun 2014 11:49:00 +0000
    From: Nature TTL <info@naturettl.com>
    Message-ID: <890000dee1d47ab423e7ece543408366@www.naturettl.com>
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
    	boundary="b1_890000dee1d47ab423e7ece543408366"
    Content-Transfer-Encoding: 8bit
    X-Authenticated-As: naturettl.com@web112.extendcp.co.uk
    
    --b1_890000dee1d47ab423e7ece543408366
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    From: Kaspars <hi@kaspars.net>
    Subject: Testing form submissions
    
    Message Body:
    Is my email being included in the email message that you receive?
    
    --
    Newsletter: 
    
    This e-mail was sent from the Nature TTL contact form.
    
    ---
    
    Email sent June 4, 2014 @ 12:49 pm
    For any queries, please contact info@naturettl.com
    
    --b1_890000dee1d47ab423e7ece543408366
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html;UTF-8" />
      </head>
      <body style="margin: 0px; background-color: #F4F3F4; font-family: Helvetica, Arial, sans-serif; font-size:12px;" text="#444444" bgcolor="#F4F3F4" link="#21759B" alink="#21759B" vlink="#21759B" marginheight="0" topmargin="0" marginwidth="0" leftmargin="0">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F4F3F4">
    <tbody>
    <tr>
    <td style="padding: 15px;"><center>
    <table width="550" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
    <tbody>
    <tr>
    <td align="left">
    <div style="border: solid 1px #d9d9d9;">
    <table id="header" style="line-height: 1.6; font-size: 12px; font-family: Helvetica, Arial, sans-serif; border: solid 1px #FFFFFF; color: #444;" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
    <tbody>
    <tr>
    <td style="color: #ffffff;" colspan="2" valign="bottom" height="30">.</td>
    </tr>
    <tr>
    <td style="line-height: 32px; padding-left: 30px;" valign="baseline"><span style="font-size: 32px; color: #82a805;"><a style="text-decoration: none;" href="http://www.naturettl.com" target="_blank"><span style="color: #82a805;">N</span></a>ature TTL</span></td>
    <td style="padding-right: 30px;" align="right" valign="baseline"><span style="font-size: 14px; color: #777777;"><a title="Nature TTL" href="http://www.naturettl.com">www.naturettl.com</a> </span></td>
    </tr>
    </tbody>
    </table>
    <table id="content" style="margin-top: 15px; margin-right: 30px; margin-left: 30px; color: #444; line-height: 1.6; font-size: 12px; font-family: Arial, sans-serif;" width="490" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
    <tbody>
    <tr>
    <td style="border-top: solid 1px #d9d9d9;" colspan="2">
    <div style="padding: 15px 0;">From: Kaspars <hi@kaspars.net><br />
    Subject: Testing form submissions<br />
    <br />
    Message Body:<br />
    Is my email being included in the email message that you receive?<br />
    <br />
    --<br />
    Newsletter: <br />
    <br />
    This e-mail was sent from the Nature TTL contact form.</div>
    </td>
    </tr>
    </tbody>
    </table>
    <table id="footer" style="line-height: 1.5; font-size: 12px; font-family: Arial, sans-serif; margin-right: 30px; margin-left: 30px;" width="490" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
    <tbody>
    <tr style="font-size: 11px; color: #999999;">
    <td style="border-top: solid 1px #d9d9d9;" colspan="2"><img style="padding-top: 28px;" alt="WP" src="http://www.naturettl.com/wp-admin/images/wp-logo.png" width="16" height="16" align="right" />
    <div style="padding-top: 15px; padding-bottom: 1px;"><img style="vertical-align: middle;" alt="Date" src="http://www.naturettl.com/wp-admin/images/date-button.gif" width="13" height="13" /> Email sent June 4, 2014 @ 12:49 pm</div>
    <div><img style="vertical-align: middle;" alt="Contact" src="http://www.naturettl.com/wp-admin/images/comment-grey-bubble.png" width="12" height="12" /> For any requests, please contact <a href="mailto:info@naturettl.com">info@naturettl.com</a></div>
    </td>
    </tr>
    <tr>
    <td style="color: #ffffff;" colspan="2" height="15">.</td>
    </tr>
    </tbody>
    </table>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </center></td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>
    
    --b1_890000dee1d47ab423e7ece543408366--
  16. npacademy
    Member
    Posted 12 months ago #

    Changed to my yahoo address. Exactly the same issue.
    From address is still my naturettl address and company name, no email info in header or body.

  17. Kaspars
    Member
    Posted 12 months ago #

    Have a closer look at the message -- I can see my email address there. Even the HTML version contains a div with my email address.

    It looks like the email address is being interpreted as an HTML tag by your email client. Try switching to the plain text view.

  18. npacademy
    Member
    Posted 12 months ago #

    Do you mean to switch to plain text view for all my emails in my mail client, or is this an option in the contact form 7 plugin?

  19. Kaspars
    Member
    Posted 12 months ago #

    Another solution would be to remove < and > characters from the email address in the "Message body". From:

    From: [your-name] <[your-email]>

    to:

    From: [your-name] [your-email]

  20. Kaspars
    Member
    Posted 12 months ago #

    @npacademy I mean plain text view when viewing the email on your desktop in a mail client.

  21. npacademy
    Member
    Posted 12 months ago #

    Remove < and > shows me the email address in the body.

    However the header from address is still my company email and name.

    Thanks for your help so far and fixing that bit. Do you have any idea how to get the from address in the header to be correct though? I removed < and > again but it didn't change it.

  22. Kaspars
    Member
    Posted 12 months ago #

    Try the setup I suggest in this blog post. In your case that would be:

    From:

    [your-name] <[your-email]>

    Additional headers:

    Sender: info@naturettl.com
    Reply-To: [your-name] <[your-email]>

    [Link moderated. Please do not use these forums to promote posts on your own site.]

  23. npacademy
    Member
    Posted 12 months ago #

    Hi,

    So the reply-to now works thank you, but the from header is still wrong.

    Does the author have a fix?

  24. buzztone
    Member
    Posted 12 months ago #

    The link deleted by the moderator above, http://kaspars.net/blog/wordpress/contact-form-7-not-sending-emails, is a useful article that will help users deal with emails sent from CF7 being seen as spam.

  25. npacademy
    Member
    Posted 12 months ago #

    Hi, the messages are coming through, but I cannot see the "From address" in the header. I can see the reply-to address now, but still not the from address.

    The blog post gives the impression it should come through as from the user. Maybe not ?

  26. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 12 months ago #

    Try deactivating all other plugins and switching to the default theme, as it's highly possible that one of them is overwriting From header.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.