We have had one outbound email account used for everything on the system form the start, but a new custom module needs to send email via a different account. So I have added this to suiteCRM in the outbound email profiles and called it Orders
Typically I use this script when needing to send an email
$emailObj = new Email();
$defaults = $emailObj->getSystemDefaultEmail();
$mail = new SugarPHPMailer();
$mail->setMailerForSystem();
$mail->From = $defaults['email'];
$mail->FromName = $defaults['name'];
$mail->Subject = "subject";
$mail->Body = 'hello there.';
$mail->addAttachment($file, $filename);
$mail->prepForOutbound();
$mail>AddAddress("address");
if ($sendemail) {@$mail->Send();}
unset($mail);
what would I need to change / add to use the orders profile?
Many Thanks
Pete