Below
"SMTP Mail Setup" and "SMTP Mail" are set for Mark for removal in business central.
I have one question when I upgrade the code regarding E-mail.
I have used the below object Codeunit "Email Message" and Email.
but I have did not find any way to change from name and From address while using the below function accordingly new object
"Email Message".Create(ToRecipients: List of [Text], Subject: Text, Body: Text, HtmlFormatted: Boolean, CCRecipients: List of [Text], BCCRecipients: List of [Text])
but in the Previous object function, we can change the from name and From address value.
like.
"SMTP Mail".CreateMessage(FromName: Text, FromAddress: Text, Recipients: List of [Text], Subject: Text, Body: Text, HtmlFormatted: Boolean)
I want to send mail according to the salesperson's email [FromAddress]. salesperson are many and we can not set many email accounts in business central.
Is that any way we can achieve it using "Email Message".Create(ToRecipients: List of [Text], Subject: Text, Body: Text, HtmlFormatted: Boolean, CCRecipients: List of [Text], BCCRecipients: List of [Text])