On Fri Aug  3 13:22:11 2007, Travis Hervey wrote:
> I am using the Email::MIME:CreateHTML module to send html formatted
> emails.  It all works fine until I try to change the "To" line to a
> scalar so that I can mass mail to different individuals.  Has anyone
> used this module in a manner like this before?  Thanks,
> 
> my $email = [EMAIL PROTECTED];
> 
> while(<DAT>)
> 
> {
> 
>         $line = TRIM($_);
> 
>         $html = $html . $_;
> 
>         if($line eq "</body>")
> 
>         {
> 
> my $email = Email::MIME->create_html(
> 
>         header => [
> 
>                 From => '[EMAIL PROTECTED]',
> 
>                 To => '$email',
> 
>                 Subject => 'Some Subject',
> 
>         ],
> 
>         body => $html,
> 
> );
> 
>  
> 
> my $sender = Email::Send->new({mailer => 'SMTP'});
> 
> $sender->mailer_args([Host => 'tiger.georgetowncollege.edu']);
> 
> $sender->send($email);
> 
>                 $html = "";
> 
>         }
> 
> }
> 
> close(DAT);
> 
>  

get rid of the single quotes around $email. a variable inside single quotes is 
just text. a variable inside double quotes will do what you expect.

d.

-- 
==========================
$mysig = <<EOS;
while(1){
    ....
}

daniƫl <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
http://0x64.nl
gmail talk: devogon

EOS

Attachment: pgpaKxSuqDP50.pgp
Description: PGP signature

Reply via email to