Home › Forums › Quform WordPress › Send Custom Email
- This topic has 1 reply, 1 voice, and was last updated 8 years, 11 months ago by bfagundes.
- AuthorPosts
- May 8, 2015 at 3:31 pm #15217bfagundesParticipant
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; ?>
May 8, 2015 at 7:45 pm #15218bfagundesParticipantNevermind,
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(); ?>
- AuthorPosts
- You must be logged in to reply to this topic.