Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: HTML Email Help!

by samtregar (Abbot)
on Jan 12, 2009 at 19:46 UTC ( [id://735788]=note: print w/replies, xml ) Need Help??


in reply to HTML Email Help!

Looks to me like you're pretty close to getting it. You can finish by moving that block of "logic" (programmers usually call it code) up above the call to MIME::Lite->new(). Now where you want the output from this block to go, put a variable like $data_table. Then all you need to do is figure out how to accumulate rows into $data_table and you're done. Give it a try and post again if you run into problems.

Once you have it working, you might consider taking the next step and putting all that gnarly HTML into a template, perhaps using HTML::Template. Then you can separate the Perl code in your program from the HTML presentation in the email and when the graphic designer complains that you didn't get the font spacing just right you can tell them to fix it themselves!

-sam

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found