in reply to Re^2: Template Toolkit: Output one template to Sendmail, another to browser?
in thread Template Toolkit: Output one template to Sendmail, another to browser?

You've almost got it. Your call to process should be:
$template->process($template_file, $vars, \$email_content) || die "Template process failed: ", $template->error(), "\n";
Notice the slash before $email_content. It creates a scalar reference that the manual says is required for the behaviour that you want.
--
Clayton
  • Comment on Re^3: Template Toolkit: Output one template to Sendmail, another to browser?
  • Download Code

Replies are listed 'Best First'.
Re^4: Template Toolkit: Output one template to Sendmail, another to browser?
by punch_card_don (Curate) on Aug 27, 2007 at 01:03 UTC
    Yep, that did it. Got me email template by email, and my confirmation template returned to browser.

    Thanks.