Re: Mime::Lite question.
by $Bill Luebkert other posts by this author
Nov 6 2002 8:45AM messages near this date
view in the new Beta List Site
Hash tables where keys names would not be stored
|
RE: TK - stop dos window minimising?
Sisyphus wrote:
> ----- Original Message -----
> From: "Christopher Hahn" <christopher.hahn@[...].com>
> To: <perl-win32-users@[...].com>
> Sent: Wednesday, November 06, 2002 12:39 PM
> Subject: RE: Mime::Lite question.
>
>
>
> >Steven,
> >
> >Thank you for the suggestion. I will try this.
> >
> >I did check the docs. This is where I got the idea of just using the
> >arrayref, where initially I was looping iterating through the list, adding
> >each recipient. So I guess the docs are in error where they refer to
> >"arrayref" below:
> >=========================
> >Giving VALUE as an arrayref will cause all those values to be added.
> >This is only useful for special multiple-valued fields like "Received":
> >=========================
> >(From:
> >
>
> http://search.cpan.org/author/ERYQ/MIME-Lite-2.117/lib/MIME/Lite.pm#Setting_
>
> >getting_headers_and_attributes)
> >
> >I expect that "To" is a "multiple-valued" field.....but is it "special"?
>
> :-)
>
>
> I suspect that "To" is *not* a multiple-valued field. The other
> references/examples in the docs all present "To" as a single-valued field.
> "Cc" is multiple-valued and you might have to use that option instead.
>
> I can't find a way of getting multiple emails sent by playing with the "To"
> field - at least I haven't, yet :-)
>
> When I tested Steven's suggestion I found that the email was still only
> being sent to one address - though this time it was the second address.
> (With Christopher's original script it was sent to the first address.)
This should work (2 methods):
Declare the adressees:
my @to = ('me@there.com', 'you@there.com', 'him@there.com');
my $to = join ',', @to; # stringify the array
Send:
my $msg = MIME::Lite-> build(
To => $to,
...
# or just put the list in here if you like
To => 'me@[...].com,you@[...].com,him@there.com',
Gets a little more complicated if you have names and <> in there as well,
but should still work (untested in that form).
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:dbe@[...].com
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Christopher Hahn
Sisyphus
Thomas Drugeon
$Bill Luebkert
|