The documentation of Mail::Sender tells us:

to => the recipient's address(es) This parameter may be either a comma separated list of email + addresses or a reference to a list of addresses.
This and the examples later in the docu indicate that it should work like this:

to => join(',',@rd_list);
The documentation talks about a list, but the term 'comma separated' gives a hint that it actually wants a single string with comma separated values!

Your example above is definitely false because @rd_list would be expanded to parameters. If you remember that '=>' is just an alias for ',' and each value in @rd_list will be just another parameter, you get the following:

@rd_list= ('a@b.com','b@b.com', 'c@c.com'); #Your example is then equivalent to: $sender->MailFile( { 'to', 'a@b.com', 'b@b.com', 'c@c.com' 'subject', 'Test', 'msg', "All, ...
In your example the method MailFile can't recognize whether 'subject' is still an email address or already another header. Actually '\@rd_list' would have been quite sensible and could have worked

In reply to Re: Mail::Sender Distribution List by jethro
in thread Mail::Sender Distribution List by cocl04

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.