Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Template Toolkit: Output one template to Sendmail, another to browser?

by clscott (Friar)
on Aug 26, 2007 at 17:33 UTC ( [id://635144]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://635144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2024-04-18 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found