trying to get emails from Distribution list in CPM
Content
i have created a distribution list in RNT Console trying to get those email address in CPM to use them in MailMessage, i am using this code but it is not working.
$roql_result_set = RNCPHP\ROQL::query( "SELECT Email FROM DistributionEmailList where name = '<Distribution List name>'" );
while($roql_result = $roql_result_set->next())
{
while ($row = $roql_result->next())
{
$distro = $distro.$row;
}
}
i get an "Array" String when i print $distro but not sure how to get email list. i would like to use $distro in below code:
$mm = new RNCPHP\MailMessage();
$mm->To->EmailAddresses = array($distro);
0