web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Difference between Codeunit Mail and SMTP Mail

(0) ShareShare
ReportReport
Posted on by

Hi All,

I would like to know the difference between Mail and SMTP Mail codeunits in terms of features like security, stability, which is much simple and how both differs in terms of operation. Is there any other codeunits to send mails from NAV apart from these two?

Kindly share your thoughts or areas to refer blogs in terms of understanding both. If both are used for sending emails alone, then why do we have more than one codeunit for the same purpose? Is there a structure to use one codeunit for a specific kind of tasks wherein the other for other set of tasks?

NOTE:

I'm using SMTPMail codeunit for sending bulks emails one by one (batch). Whenever, there is an issue in the email (in my case, if there are two emails in the Email field in the Customer table and the second mail ends with the semicolon. The sending operation stops there and I need to look in, delete the semicolon for the second email and start the batch again, which send mails to all the people who received emails successfully again.) After this, I want a smarter way of sending by sending a error log on the issue mails and proceed forward for the next emails and much more other betterment in sending mails. That's why, started to look into the advancement of these codeunits. I hope this scenario gives clarity on the question.

Thanks in advance.

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    on at
    RE: Difference between Codeunit Mail and SMTP Mail

    SMTP Mail was born for sending email through custom SMTP server (different authentication and so on), Mail codeunit for Outlook interaction. From NAV 2017 there’s also codeunit 9520 Mail Management.

    Realibility are quite the same.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans