• I’m currently looking for the action hook when the auto responder gets sent? Currently I am replacing a tag in the regular email during the “wpcf7_before_send_mail” hook however it doesn’t seem to be finding the tag in the mail (2).

    Do they share the same hook and my code just isn’t picking up the correct information for the mail (2) or does it utilize a different hook entirely?

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    The wpcf7_before_send_mail is just an action hook that fires before the plugin attempts to send Mail and Mail (2). It is not connected directly to either of the mail contents. Maybe you’re using a wrong action hook.

    Thread Starter lieutenantdan

    (@lieutenantdan)

    Hmm ok well I can confirm that I am using that hook and the tag I have added is able to replace the body of the mail being sent.

    What are the hooks that should be used for mail and mail (2) tags then?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    If I did, I would use wpcf7_mail_components filter in includes/mail.php.

    lieutenantdan
    Your option to use a hook to modify the data writing, right.
    I have this option to work a few days ago, but now is not working hook. I am looking for a solution.

    Thread Starter lieutenantdan

    (@lieutenantdan)

    Hmm so when I’m trying the [_post_title] tag it doesn’t seem to work in either mail or mail (2)

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    https://contactform7.com/special-mail-tags/

    Note that the [_post_*] tag has value only when you put the contact form into content of a post or a page.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Action hook for mail (2)?’ is closed to new replies.