Problem

Older version of NAV (Version 2017 or earlier) may not able to connect to Office365 to send email

Solution

Due to security enhancement of SMTP, supporting to older authentication will be phase out, the following solution solved TLS1.2 support requirement.

For NAV server
  1. Cross check if you have installed the supported NAV CU as table belows

    VersionTLS 1.2 support added
    Dynamics NAV 2015Cumulative update 43
    Dynamics NAV 2016Cumulative update 31
    Dynamics NAV 2017Cumulative update 18
    Dynamics NAV 2018First release (RTM)
  2. Open CustomSettings.config under server instance directory (e.g. C:\Program Files\Microsoft Dynamics NAV\100\Service\ or C:\Program Files\Microsoft Dynamics NAV\100\Service\Instances\ABC_NAV_LIVE)
  3. Add/Change the following value from "SystemDefault" to "Tls12"
      <add key="SecurityProtocol" value="Tls12" />  
  4. When save, the file must to save to somewhere else then copy back to directory

For Office 365 portal: (portal.office.com)

  1. Using Office Administration: Turn on two factor authentication (2FA) for specific email account 
    (Office Portal > Admin > Users > Active users > Mulit-factor authentication > Change to Enabled > Change to Enforced)
  2. Using email user account: Generation an app password
    (Top-right corner user icon >  View account > Security Info > + Add Sign-in method > App password > (give a name for that password) > copy that password out


For NAV SMTP setting:

  1. Start NAV client, search "SMTP Mail Setup"
  2. Press "Apply Office 365 Server Settings" on ribbon
  3. input User ID as email address, password as App password generated last step
  4. Try send email to the same email address to user ID (other email testing not working)

Office 365 generate App passwords