$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:
- oe (Object) OutboundEmail
- protocol (String, 6 characters ) tcp://
- preppedForOutbound (Boolean) FALSE
- disclosureEnabled (NULL)
- disclosureText (NULL)
- isHostEmpty (Boolean) FALSE
- opensslOpened (Boolean) TRUE
- Version (String, 6 characters ) 5.2.13
- Priority (NULL)
- CharSet (String, 5 characters ) UTF-8
- ContentType (String, 10 characters ) text/plain
- Encoding (String, 16 characters ) quoted-printable
- ErrorInfo (String, 0 characters )