DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Microsoft Graph API for sending mail SMTP

 6 Replies
 2 Subscribed to this topic
 35 Subscribed to this forum
Sort:
Author
Messages
Advanced Member Send Private Message
Posts: 209
Advanced Member

I like to use the DNN integrated SMTP functionality but I can't get it to work without errors. Tried Oauth SMTP but no luck...

Hopefully is Microsoft Graph API an option?

Is this integrated in DNN 9.13? Anyone tried this in DNN and got it working succesfully?

Senior Member Send Private Message
Posts: 1551
Senior Member
Do you have any steps you've tried, and any specific errors you can share? I'm afraid that there isn't enough detail here to help you much more. Though, I'd also recommend using SendGrid or something else. You'll get more reporting, troubleshooting, security, and configuration options.
Advanced Member Send Private Message
Posts: 209
Advanced Member
DNN has the default SMTP options: Anonymous, Basic, NTLM, OAuth

Because of security reasons we have to use Microsoft Graph Api... Upgraded to the latest version of DNN 9.13.4 but I don't see the Microsoft Graph options.
New Around Here Send Private Message
Posts: 3
New Around Here
We use the OAUTH option. This uses Microsoft Graph.
In Microsoft Azure, you create an App Registration.
The only permission needed is Microsoft Graph -> STMP.Send (Delegated)
Growing Member Send Private Message
Posts: 51
Growing Member

And what do you use for SMTP server in DNN? I keep getting "535: 5.7.3 Authentication unsuccessful [AM0PR02CA0223.eurprd02.prod.outlook.com 2025-01-03T12:59:36.344Z 08DD2AC3E9C1C2B2]"

My app registration has the permission you mention and I am now looking at these settings on the authentication tab of the app registration:

Select the tokens you would like to be issued by the authorization endpoint:
[ ] Access tokens (used for implicit flows)
[ ] ID tokens (used for implicit and hybrid flows)

Growing Member Send Private Message
Posts: 72
Growing Member

Related: https://dnncommunity.org/forums/aft/5331

New Around Here Send Private Message
Posts: 3
New Around Here

Hi Stepan,

I hope this will help you:

  • In DNN
    • Personabar - Security - More - SSL Settings:
      Make sure that SLL Settings = ON
       
  • In Exchange
    • Create a mailbox with a licence.
    • As Admin: In the accountsettings ensure that the option Verified SMTP is enabled
      Userdetails - E-mail - E-mail apps
    • NB: In the tenantsettings Verified SMTP is not always enabled.
      You can enable this option for a user with the Powershell command:
      Set-CASMailbox -Identity [login-address] -SmtpClientAuthenticationDisabled $false
       
  • In Azure
    • Create an App registration
      • Redirect URIs:
        • https://[DOMAINNAME]/Providers/SmtpOAuthProviders/ExchangeOnline/Authorize.aspx

        • https://[DOMAINNAME]

      • Secret

      • API Permissions

        • Microsoft Graph

          • Delegated -> SMTP.Send (Send emails from mailboxes using SMTP AUTH)

  • In DNN

    • Servers - Seversettings - SMTP Server

      • SMTP Sever and Port = smtp.office365.com:587

      • SMTP Authentication= OAuth

      • Auth Provider = Exchange online

      • Tenant Id = [Directory (tenant) ID] 

      • Client Id = [Application (client) ID]

      • Client Secret = [client secret value]

    • Save Settings

    • Authorize

      • Using the Microsoft Mailbox credentials

    • Test SMTP Settings

These Forums are dedicated to the discussion of DNN Platform.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved