All, I am trying to pass a list of email addresses from an array to Mail::Sender. I have tried putting comma between them, single quotes at the end, double quotes at the end and nothing. I can't seem to get it to work. I have dumped the data via DATA::DUMPER and it is fine. I can print the data and it is fine. I have an old project where I send an array of attachement. And it works fine. But the To => syntax does not seem ot work the same. Does anyone have any ideas? The data is in an the array @rd_list. I have also tried \@rd_list which worked for the array of attachements.

$sender->MailFile( { to => @rd_list, subject => 'Test', msg => "All, Please ignore this email! This is a test. Thanks, cc\n", file => $complete_file_path, }); $sender->Close;

In reply to 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.