Hi, I’ve been trying to output the full list of an email marketing bean but the value that I’m getting is “1”, I tried different ways but is not working can someone help out and tell me what am i doing wrong?
$mark_search = null ;
$mrkt_email = BeanFactory::getBean(‘EmailMarketing’,$mark_search);
$mrkt_email_results = $mrkt_email->get_full_list("", “emailmarketing.campaign_id=‘4510e1c0-e522-aa0b-9d92-6172e6569323’”);
$body = "<html>";
$body = print_r($mrkt_email_results,$true);
$body .= "</html>";
In case y’all need the whole code :
class send_info_email_marketing{
function after_login_methodtest($bean ,$event, $arguments){
require_once $_SERVER[DOCUMENT_ROOT].'/include/SugarPHPMailer.php';
$mailer=new SugarPHPMailer();
$mailer->prepForOutbound();
$mailer->setMailerForSystem();
$mailer->From = "crm@ecs-support.com";
$mailer->FromName = "CRM ADDING TO QUEUE";
$mailer->IsHTML(true);
$mailer->Subject = "Expecting info";
$mark_search = null ;
$mrkt_email = BeanFactory::getBean('EmailMarketing',$mark_search);
$mrkt_email_results = $mrkt_email->get_full_list("", "emailmarketing.campaign_id='4510e1c0-e522-aa0b-9d92-6172e6569323'");
$body = "<html>";
$body = print_r($mrkt_email_results,$true);
$body .= "</html>";
$mailer->Body = $body;
$mailer->AddAddress("dsanchez@ecs-support.com");
$mailer->Send();
}
}