Registered and app to send emails from my wordpress site, cannot send

Jonathan Ciaccio 0 Reputation points
2024-03-13T11:28:14.4233333+00:00

Hello,

I created and app registration and connected it to my wordpress site. However, it still gives me this error:

Versions:
WordPress: 6.4.3
WordPress MS: No
PHP: 7.4.33
WP Mail SMTP: 4.0.2

Params:
Mailer: outlook
Constants: No
App ID/Pass: Yes
Tokens: Yes

Debug:
Email Source: WP Mail SMTP Pro
Mailer: 365 / Outlook
MailboxNotEnabledForRESTAPI: The mailbox is either inactive, soft-deleted, or is hosted on-premise.

Any idea?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
766 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 16,101 Reputation points
    2024-03-14T22:03:37.25+00:00

    Hi @Jonathan Ciaccio is this an active/new mailbox? can you please share with us how you set up your wordpress site?

    The MailboxNotEnabledForRESTAPI error you shared means the mailbox is either inactive, soft-deleted, or is hosted on-premise. This error can occur when you’re trying to access the mailbox of a guest user in a different tenant

    In the meantime, here are three things to do to troubleshoot the issue.

    1. Verify Mailbox Status:
    • Login to your Microsoft 365 admin portal (https://www.office.com/).
    • Go to "Users" and locate the specific mailbox experiencing the issue.
    • Check the mailbox status. It should be active and not soft-deleted. A soft-deleted mailbox can be recovered, but it won't work with the API until restored.
    1. Enable Microsoft Graph API Access:
    • In the Microsoft 365 admin portal, navigate to "Azure Active Directory" and then "App registrations."
    • Locate the app registration you created for WP Mail SMTP Pro.
    • Click on the app registration and then go to "Expose an API."
    • Under "Delegated permissions," ensure the following permissions are granted: Mail.Send User.Read (This is required for some mailbox information)
      • Click on "Grant admin consent" to give your app permission to access these features for your entire organization.
    1. Check App Registration Details in WP Mail SMTP Pro:
    • In your WordPress dashboard, go to WP Mail SMTP settings.
    • Under the "Mailer" tab, ensure you've selected "Outlook" as the mailer type.
    • Double-check that you've entered the correct App ID, Client Secret, and Access Token generated during the app registration process.

    Best,

    Grace

    0 comments No comments