in reply to Re: Attaching images to email html template help!
in thread Attaching images to email html template help!
#from the .pl file call the module ... mod_email( {to=>$to, from => $email, subject=>$subject, body=>$body, t +tparams => $templ_data},imgs=>@imgs ); #now this part would be code inside of the module mod_email ... sub process_email_stuff { my ($vals) = @_; my $to = $vals->{ to } || {}; my $from = $vals->{ from } || {}; my $subject = $vals->{ subject } || {}; my $body = $vals->{ body } || {}; my $ttparams = $vals->{ ttparams } || {}; #questioning this: my @imgs = $vals->{ imgs } || {}; my $msg = MIME::Lite::TT::HTML->new( From => $from, ... #all the other stuff its done, now get to the @imgs processing, hopefu +lly. for my $img (@imgs ) { $msg->attach( %$img ) or die "Error adding $img- {Filename}: $!\n" +; } ... 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Attaching images to email html template help!
by Eliya (Vicar) on Mar 18, 2011 at 13:54 UTC |