On Wed, Sep 08, 2004 at 05:32:11PM +1000, Dean Hamstead wrote:
> i cant seem to make sense of how to use embperl's inbuilt
> email functions
>
> can someone send me a quick example
>
> even a link found on google ;)

[ Okay, first version get held for moderation by Mailman, with a
  'Message has a suspicious header' warning - I'll try adding a 
  Message-ID ]

Reply sent via HTML::Embperl::Mail :-), using:

 perl -MEmail::MessageID -MTime::Piece -MHTML::Embperl::Mail -le 
"HTML::Embperl::Mail::Execute({ 
   inputfile => 'reply-to-dean.epl', 
   subject => 'Re: [SLUG] embperl and its mail function', 
   to => '[EMAIL PROTECTED]', 
   from => '[EMAIL PROTECTED]', 
   mailheaders => [ 
     'In-Reply-To: <[EMAIL PROTECTED]>', 
     'Date: ' . localtime->strftime('%a, %d %b %Y %H:%M:%S %z'),
     'Message-ID: ' . Email::MessageID->new,
     'X-Mailer: HTML::Embperl::Mail',
   ] })" 

reply-to-dean.epl is the mail template, and contains exactly what you're 
reading here, except that embperl stuff gets executed as expected e.g.
[+ localtime +] gets expanded to: Wed Sep  8 20:59:19 2004.

HTH,
Gavin

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to