• Hello,

    I’d like to follow up on a previously reported issue (now closed, see https://wordpress.org/support/topic/resend-email-after-marked-as-not-spam-is-sent-to-email-address-website-admin/)

    Currently, the “Resend email” action does not work when a message is marked as “Not Spam.” In my setup, this action has no effect at all.

    In my CF7 form, I’ve configured a custom email address in the “To” field. I understand and have verified that the Flamingo plugin does not store this custom address either in the form data or in the metadata of a message. This seems to be the reason why the resend action fails, because the target address is not available when the plugin attempts to resend.

    Expected behavior

    After marking a message as “Not Spam,” clicking “Resend email” should trigger the original email to the same recipient configured in the CF7 form’s “To” field.

    Possible directions

    Maybe the plugin could retrieve the recipient address from the CF7 form configuration?

    Or allow the address to be passed through using CF7’s Additional Settings feature? Relevant references:

    Is it already possible to have CF7+Flamingo store the value of the “To” field? This might allow the “resend email” action to consume this value.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chrober

    (@chrober)

    Additional thought:

    I almost forgot that I am already using this via the “Code Snippets” plugin (a step towards GDPR):

    // define the wpcf7_flamingo_inbound_message_parameters callback 
    function custom_wpcf7_flamingo_inbound_message_parameters( $args ){
    $args['meta']['remote_ip'] = '';
    $args['meta']['user_agent'] = '';
    return $args;
    }

    //add the action
    add_filter('wpcf7_flamingo_inbound_message_parameters', 'custom_wpcf7_flamingo_inbound_message_parameters', 10, 1);

    Is there any way to read the value of the CF7 form’s “To” field and inject it to the message via such a code snippet?

    Plugin Author Erik

    (@codekraft)

    Hi @chrober,

    Thanks for the detailed report! I’ve moved this to a GitHub issue for better tracking: GH related issue

    I prefer retrieving from CF7 form configuration as the best long-term solution. While obtaining data from CF7 forms is complex, this approach makes the most sense architecturally (and requires no configuration from the user).

    The only trade-off is that the resent email destination might differ from the original if someone changes the CF7 form’s “To” field between submission and resend – but this is a rare edge case.

    We could also use a filter to overwrite the destination, allowing more experienced users to customise it.

    Your Code Snippet Question

    Regarding injecting the “To” field via wpcf7_flamingo_inbound_message_parameters: I need to double-check, but I believe this isn’t possible because the “To” field is stored in CF7 form post metadata, which isn’t accessible in Flamingo post data during that filter.

    I’ll work on implementing the form configuration retrieval approach and update the GitHub issue with progress.

    Thanks for the thorough analysis!

    Thread Starter chrober

    (@chrober)

    Hi @codekraft, thanks a lot for picking this up and for the detailed explanation! Retrieving the address from the CF7 form configuration sounds like a solid approach, and I really appreciate you looking into it!

    Plugin Author Erik

    (@codekraft)

    Hello @chrober,

    I apologise for the time it took to publish a new version of the plugin, but as you will see, I have completely revamped and improved the admin/configuration pages. Additionally you can now resend any emails you need from the Flamingo inbound page, as you requested. Could you please check that it works for you, please?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.