Send Custom Email

Home Forums Quform WordPress Send Custom Email

This topic is: resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15217
    bfagundes
    Participant

    Hey Guys,

    I want to send a custom email to the user when he sends the form. I have looked this tutorial https://support.themecatcher.net/quform-wordpress/guides/email/custom-email-content and some forum posts, but it doesn’t seem to work.

    It is sending what i’ve configured on the settings > email instead of the custom PHP page. Do i need to check some checkbox somewhere?

    I have a custom page, with custom logic, that I show the users when they send the form. Basically, I want to show that same information from that page on the email. I don’t know if it’s related, but on this page I had to use the session variable to get all the data from the form, for example:


    <?php
    $process = $_SESSION['iphorm_2']['iphorm_2_15'];
    ?>
    <p><b>Processo: </b><?php echo $processo; ?>

    #15218
    bfagundes
    Participant

    Nevermind,

    I got it working with this code:


    function mytheme_customize_autoreply($mailer, $form, $attachments)
    {
    // Get the new email content from the file autoreply-content.php
    ob_start();
    include dirname(__FILE__) . '/email_processo_0012015.php';
    $content = ob_get_clean();

    // Set the email content
    $mailer->MsgHTML($content);

    // You must return the $mailer object
    return $mailer;
    }
    add_action('iphorm_pre_send_autoreply_email_2', 'mytheme_customize_autoreply', 10, 3);

    and I opened a session before getting the information of the email.


    <?php session_start(); ?>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy