WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 Dynamic Text Extension
Email to author (9 posts)

  1. erbrown777
    Member
    Posted 2 years ago #

    Thies is really a fantastic plugin that helped me get improtant feedback.

    The final step would be to email the post author. Is it possible to gather that information and insert it into the "To:" field?

    http://wordpress.org/extend/plugins/contact-form-7-dynamic-text-extension/

  2. Gerald Cox
    Member
    Posted 2 years ago #

  3. Pete
    Member
    Posted 2 years ago #

    I've had a really good read of http://sevenspark.com/tutorials/how-to-dynamically-set-the-recipient-to-email-address-in-contact-form-7, tried all sorts of combinations but I am soooo far from coming close to a solution it's just not funny any more.

    I'm at the point now where I throw up my arms and say "I have no idea what I'm doing".

    If someone here could be kind enough to go into my admin and set it up for me I'm sure I could look at at and have a AHHHH moment and see how it all works.

    I'll happily donate some beer money :)

  4. Alessandro Cardinali
    Member
    Posted 2 years ago #

    I use this method:

    put in function.php

    //Shortcode CF7 Email autore annuncio
    function author_email($post_ID)  {
    	$user_email = get_the_author_meta('user_email',$authid); // retrieve user email
    	return $user_email;
    }
    add_shortcode('authormail', 'author_email');

    use this shortcode in CF7:
    [dynamichidden email-author "authormail"]

    regards.

  5. 1two3
    Member
    Posted 2 years ago #

    Alessandro, thanks so much. I will give that a try.

  6. kletskater
    Member
    Posted 2 years ago #

    I have tryed to place the shortcode but probably at the wrong place in my cf7, for it is not working
    where in CF7 do i have to place [dynamichidden email-author "authormail"] ?

  7. Alessandro Cardinali
    Member
    Posted 2 years ago #

    place: [dynamichidden email-author "authormail"]
    in cf7 form editor.

  8. kletskater
    Member
    Posted 2 years ago #

    Thank's Alessandro. It works. However, it is now possible for a spammer to to harvest the address of the contactform. The autor receives a mail with both his own and cf mailadress. Is there a workaround to shield of the mailadress of the contactform??

  9. marluras
    Member
    Posted 2 years ago #

    Hi I use an author page template (author.php) like this
    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I want that the message can be sent to any author on this site by an author page like this
    For the moment it works for a real mail put into the To: Field of contact-form7

    I began to try several things inspired by sevenspark but none worked for me
    I'm wondering if I can use the $curauth variable of the the template to do this.

    Anny help appreciated
    Thanks in advance
    Martin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic