On Mon, Aug 08, 2005 at 05:22:06PM -0700, Roderick A. Anderson e-scribbled:
> Is anyone creating e-mail messages using TT?  I have done the body but
> with the list of recipients changing and getting longer I thought a
> template that constructed the message headers called by a template to
> create the body made more sense.
> 
>   I'm up to messages going to one pager, two cell phones, and RT ( Not
> SPAMMING ).  Writing , even with a loop , multiple ->datasend( 'To: ' .
> "$emailto\n" ) lines is getting to be a pain.  I haven't found any modules 
> that would make this easier and I'm not quite up to writing my own at this 
> time.
> 
> Before taking a chance at re-inventing the wheel I'll ask if I missed this
> while searching and if anyone has code and/or ideas to share on it.

You discovered that TT was better than reinventing the Template wheel.

Why would you reinvent the email wheel?

Grab Mail::Mailer from CPAN. Build the body with TT and use perl code to set
the recipients. I've done exactly what you're doing and I know your pain. I
had to send html-mail to email clients and a stripped down minimail to
pagers at the same time.

Better still, when you discover the need to stack mime-attachments to your
email one day, you'll add one or two lines and be done. Or when you need to
declare the content type. 


> 
> 
> TIA,
> Rod
> -- 
>     "Open Source Software - You usually get more than you pay for..."
>      "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
> 
> 
> 
> _______________________________________________
> templates mailing list
> [email protected]
> http://lists.template-toolkit.org/mailman/listinfo/templates

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to