Email In CC and BCC D365FO


Email In CC and BCC D365FO


As we all know the feature to send the email in CC and BCC is not yet available on UI, But the sysMailer class has the option to achieve the objective.

Here is the sample code:

class SLD_DemoInstance
{



    public void main(Args _args)
    {
      

        SysMailerMessageBuilder builder = new SysMailerMessageBuilder()
    .setFrom("shaikhsohailhussain@gmail.com")
    .addTo("to@example.com")
    .addCc("cc@example.com")
    .addBcc("bcc@example.com")
    .setSubject("Test")
    .setBody("Test email");
   
        SysMailerFactory::sendNonInteractive(builder.getMessage());

    }

}

No comments:

Post a Comment

Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...