i want to know does the variable $emailaddress exist in $template1? or can I use $emailaddress in <#MY_TAG>?
sorry, i have trouble explaining this.
my $template1 = "/templates/v_template.html";
my $template2 = "/templates/c_template.html";
foreach $emailaddress(@email)
{
open (MAIL, $mailcmd)|| die "sendmail: $!";
print MAIL <<EOF;
From: support\@email.com
TO: $emailaddress
CC: support\@email.com
Subject: text
Content-type: text/html
EOF
print MAIL $PARSER->parse_file($template1);
print MAIL $PARSER->parse_file($template2);
close MAIL;
}
_______________________
in v_template.html
<html>
<#MY TAG>
</html>
_______________________
in my tag module
add_tag( MY_TAG =>sub{
print $emailaddress;
});
sorry, i have trouble explaining this.
my $template1 = "/templates/v_template.html";
my $template2 = "/templates/c_template.html";
foreach $emailaddress(@email)
{
open (MAIL, $mailcmd)|| die "sendmail: $!";
print MAIL <<EOF;
From: support\@email.com
TO: $emailaddress
CC: support\@email.com
Subject: text
Content-type: text/html
EOF
print MAIL $PARSER->parse_file($template1);
print MAIL $PARSER->parse_file($template2);
close MAIL;
}
_______________________
in v_template.html
<html>
<#MY TAG>
</html>
_______________________
in my tag module
add_tag( MY_TAG =>sub{
print $emailaddress;
});