AnsweredAssumed Answered

custom email code not sending returns false

Question asked by Rodolfo Tuble on Oct 16, 2016
Latest reply on Oct 17, 2016 by Offshore Evolution

$link = '<a href="http://'.$root_url.'/index.php?module=CB_SupportTickets&action=DetailView&record='.$bean->id.'"/> Click Here</a>';

$emailObj = new Email();
$defaults = $emailObj->getSystemDefaultEmail();
$mail = new SugarPHPMailer();
$mail->setMailerForSystem();
$mail->From = $defaults['email'];
$mail->FromName = $defaults['name'];
$mail->Subject = "Support Ticket";
$mail->Body = "test ".$ticketNumber." is now ".$bean->resolution. ". ".$link;
$mail->prepForOutbound();
$mail->AddAddress("myawesome@email.com");
$mail->Send();

 

This is the result of the print_r the upper results only:

 

Outcomes