Announcements
Hi All,
I am having a similar issue. We want to use the default SMTP email for job queues. We have a custom code that sends email notifications (outside our company when the button is clicked). We want to send it from the user's account. I tried both Email Accounts and created a new scenario for the Current User. It is not working. It is still sending it from our default account.
My sincere apologies. I had some issue with the browser. It got posted multiple times.
I am having the same issue. I tried both Email Accounts and Email Scenarios. We want to use SMTP for job queues. It is set as default. We have a custom code that sends notification outside of our company (when the button is clicked). We want to send it from the "Current User". It is not working. It is still sending from SMTP I created a new scenario and assigned it to the current user.
lEmailCu.Send(lEmailMessageCu, "Email Scenario"::"Dispatch Tech");
I am having the same issue. I tried both Email Accounts and Email Scenarios. We want to use SMTP for job queues. It is set as default. We have a custom code that sends notification outside of our company (when the button is clicked). We want to send it from the "Current User". It is not working. It is still sending from SMTP I created a new scenario and assigned it to the current user.
I am having the same issue. I tried both Email Accounts and Email Scenarios. We want to use SMTP for job queues. It is set as default. We have a custom code that sends notification outside of our company (when the button is clicked). We want to send it from the "Current User". It is not working. It is still sending from SMTP I created a new scenario and assigned it to the current user.
I am having the same issue. I tried both Email Accounts and Email Scenarios. We want to use SMTP for job queues. It is set as default. We have a custom code that sends notification outside of our company (when the button is clicked). We want to send it from the "Current User". It is not working. It is still sending from SMTP I created a new scenario and assigned it to the current user.
Did you ever reach a satisfactory solution to this one? If yes, please give brief description?
Hi Inge M. Bruvik, could you show the sample code for "Send(Codeunit "Email Message", Record "Email Account")". How i can use "Email Account" record and Pass the to the function.Send(Codeunit "Email Message", Record "Email Account")
Using the email codeunit you basically have 3 options of controlling the sender address:
(19.1.31886.32760), 'Send(Codeunit "Email Message", Enum "Email Scenario")' defined in Codeunit 'Email' by the extension System Application by Microsoft (
19.1.31886.32760), 'Send(Codeunit "Email Message", Record "Email Account")' defined in Codeunit 'Email' by the extension System Application by Microsoft
(19.1.31886.32760), 'Send(Codeunit "Email Message", Guid, Enum "Email Connector")' defined in Codeunit 'Email' by the extension System Application by Microsoft
So either email scenario, Email account or Email connector.
So best practice and my recommendation would be to go with one of these options.
You have some events in the Email table that might be useful but they might break some security rules on your mail service so you might end up with email not being sent anyway.
Thanks for Reply. Yes we can add "email scenario". But In My Case I have customize email code on button. I have to send Email to Customer and the From email id must be on Salesperson email id. And there is lot of salesperson code and not feasible to setup email account and if new sales person add we need to setup email account. SO is there any event or we can set From email id using email message
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156