BuddyDev

Search

Contact Form Reply-to

Tagged: 

  • Participant
    Level: Initiated
    Posts: 10
    Barry Grennan on #21239

    Good plugin!

    I’d prefer my users to be able to reply directly to the emails they receive via the buddypress contact form.

    To that end I’ve edited class-bpucf-action-handler.php with the below code. It’d be great if this was an option in the plugin so I didn’t have to hack it after every update. Would this be possible to add?

    
    // Barry Adds
    		$admin_email = bpucf_get_option( 'admin_email' );
    		$sender_name = $_POST['name'];
    		$site_url = home_url( '/' );
    		//End Barry Adds
    		
    		$subject = $_POST['subject'];
    		$message = $_POST['message'];
    		$message .= "\r\n". sprintf( __( 'Sender: %s', 'buddypress-user-contact-form' ), $_POST['name'] );
    		$message .= "\r\n" .sprintf( __( 'Sender email: %s', 'buddypress-user-contact-form' ), $sender_email );
    		// Barry Adds
    		$message .= "\r\n" .sprintf( __( 'Sent via: %s', 'buddypress-user-contact-form' ), $site_url );
    		// End Barry Adds
    		$message .="\r\n";
    
    		$headers = array();
    			// Barry Adds
    			$headers = array(
      'Reply-To:' .$sender_name. '<'.$sender_email.'>','From:' .$sender_name. '<'.$admin_email.'>'
    );
    //End Barry Adds 
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #21245

    Hi Barry,
    Thank you for sharing the code and bringing it.

    Yes, we can certainly add Reply-To header. I am not sure why we did not add it earlier. We are already sharing the email address, so it was not a privacy concern.

    It must be something we overlooked.

    I will have an update in next couple of days and It will be available with that.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved