• Hi, I would like to know if there is a way to send email with Contact Form7 with fields I set manually with PHP. Something like this:

    $form = WPCF7_ContactForm::get_instance($form_id);

    $form_data = array(
    ‘your-name’ => “Example”,
    ‘your-email’ => “[email protected]”,
    ‘your-subject’ => “Subject”
    );

    ???

    $form->submit();

    I hope I have explained. Thank you very much.

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

    (@takayukister)

    May I ask why you need to use Contact Form 7 to just send an email?

    Thread Starter covalenciawebs

    (@cowalenciawebs)

    Hi, thank you for your answer.

    The reason is that I have two ways to fill the information of that contact form, in html form, as usual, and in woocommerce single product with a plugin of extra product fields (that also changes prices).

    I want all forms to be sent to admin by email as in Contact Form 7 and also have a plugin like Flamingo that saves all forms in database. And I want all forms and infromation in the same place.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I don’t think it is a good idea to use Contact Form 7 in this case. If you want to store submission data with the Flamingo plugin, I suggest use Flamingo alone. It is designed to be able to work without Contact Form 7.

    See the Flamingo module code to learn how to store data using the Flamingo_Contact and Flamingo_Inbound_Message classes.

    Thread Starter covalenciawebs

    (@cowalenciawebs)

    Ok, I’ll do it directly from Flamingo. But I won’t have Contact Form 7 email, and if I want to change something I will have to do it twice. And I wanted to avoid doing that.

    Does this means there is no way to do all the step with PHP?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Manually fill and send email via php’ is closed to new replies.