So, you removed the line with "Mail.Send" but you get still 2 mails?
Where are you using that code?
If you only use the NewMessage function, you should only get one mail, cause the send function is only called once.
Hello @Aluan it works now, i follow what you said. thanks followup question, how mail.newmessage works? i mean, it sends email but to think that I didn't specify a From Address but still sends email.
Answers
are you using the Codeunit 397?
If so, try it without Mail.Send.
Yes, I'm using it. still send 2 emails
Where are you using that code?
If you only use the NewMessage function, you should only get one mail, cause the send function is only called once.
Hello @Aluan it works now, i follow what you said. thanks followup question, how mail.newmessage works? i mean, it sends email but to think that I didn't specify a From Address but still sends email.
If you open Outlook you should see the sent files in the "sent items" folder.
If you don't have Outlook installed, it shouldn't work.