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
|