Hi All
When trying to send an email from AL code, is it possible check if if default email account or scenario exist? The problem is unlike other table the email accounts table is not accessible due to permissions or it is displayed as a temporary table
Basically I want to set a condition like:
EmailAccount.setrange();
If emailAccount.findfirst() then
send email
Thanks
hi
in the codeunit Mail use this function
GetDefaultScenarioEmailAddress
DAniele
Hi,
You use the procedure IsAnyAccountRegistered() in CU "Email Account" to check if an Email Account is setup (irrespective of if its SMTP or Office365).
This is used in standard BC.
You can use table 8902 and codeunit 8894 "Email Account"
Please share the error that you are getting.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156