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