Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @jathang ,

    The important detail here is that the 422 you see in FluentSMTP’s MS365 logs/reports is currently a FluentSMTP wrapper code, not always the original HTTP status returned by Microsoft Graph. In the Outlook/Office365 handler, FluentSMTP sends through Microsoft Graph’s /me/sendMail endpoint, but if the Graph call or token refresh fails, the plugin re-logs that failure as WP_Error(422, ...). So the more useful clue is usually the message text beside it, such as Unauthorized, Forbidden, or Not Found, rather than the 422 itself.

    Also, FluentSMTP’s Summary/Reporting email does not create a new Microsoft-side error on its own. It simply reads the existing email logs and reports messages that were already logged as failed.

    Since Microsoft Graph should return 202 Accepted on a successful sendMail request, seeing 422 in FluentSMTP usually means we need to inspect the exact failed log entry to find the real cause behind it.

    Could you please share the full Server Response / Technical Details from one failed email log, and also confirm these 4 points?

    1. Does this happen for all emails, or only for emails sent by a specific plugin/form/workflow?
    2. Is the site multilingual (WPML/Polylang)?
    3. Is the sender a licensed mailbox, an alias, or a shared mailbox?
    4. In Azure/Entra, are the redirect URI and mailbox permissions set exactly for the sender in use?

    If the message is Unauthorized or Forbidden, the most common causes are redirect URI mismatch, token/auth issues, or mailbox/send-as permission issues on the Microsoft side.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @awr10e ,

    The 422 Unauthorized response with Microsoft 365 usually means the Microsoft app/token is no longer being accepted, even if the connection was working previously. Since your logs show this started around July 15, 2026, I’d recommend checking the Microsoft app configuration first.

    Please go through these points:

    1. Make sure the email address set as the From Email in FluentSMTP is the same Microsoft 365 account used to authorize the connection.
    2. In your Azure/Entra app, confirm the Redirect URI exactly matches the callback URL shown in FluentSMTP.
    3. Verify the required Microsoft Graph permissions are still present and admin consent is granted.
    4. Confirm the mailbox is active and properly licensed in Microsoft 365.
    5. Remove the current Microsoft connection from FluentSMTP, then reconnect it once after verifying the above.

    If the issue remains, please share:

    • a screenshot of the FluentSMTP Microsoft connection settings
    • a screenshot of the Azure/Entra app Authentication and API permissions sections

    That will help us narrow it down further. Also, I will mark the topic as not resolved until resolved.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hello @babouz44 ,

    The 422 here is usually FluentSMTP’s wrapper around a Microsoft Graph send error. In our Outlook mailer, FluentSMTP sends through Microsoft Graph me/sendMail, so the mailbox behind the Microsoft login/token is the mailbox that actually needs permission to send.

    A couple of important notes here:

    1. The value starting with 1. after clicking “Authenticate with Office365 & Get Access Code” is not necessarily wrong. That step returns an authorization code, not the final bearer access token. FluentSMTP then exchanges that code for the real access/refresh tokens when you save the connection.
    2. The PHP warning about Undefined array key “access_token” suggests the token exchange or token refresh did not return a normal token payload, so FluentSMTP ended up without a valid usable access token.

    Please try the following from scratch:

    1. Delete the current Microsoft/Outlook connection in FluentSMTP and create it again.
    2. Use the same mailbox for all three steps:
      • the FluentSMTP “From Email”
      • the Microsoft/Entra app registration/auth flow
      • the Microsoft account used when authorizing the connection
    3. Make sure you pasted the Client Secret Value, not the Secret ID.
    4. Make sure the redirect URL in Microsoft exactly matches the FluentSMTP callback URL:
      https://yourdomain.com/wp-json/fluent-smtp/outlook_callback
    5. Please confirm the Microsoft account has an active Exchange Online mailbox/license.
    6. If this is a shared mailbox, the authenticated user also needs the proper Exchange permission such as Send As or Send on behalf, and Microsoft-side permission to send from that mailbox.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @alexqbox ,

    Apologies for the delayed reply. Thanks for sharing the screenshot.

    The browser console error is only a side effect of the real problem: the FluentSMTP test-email AJAX request is returning an HTTP 500 from wp-admin/admin-ajax.php.

    From our side, expected Outlook / Office 365 mailer errors should normally come back as a JSON response, so a raw 500 usually means one of these is happening before FluentSMTP can return its normal error message:

    1. a PHP fatal error on the site
    2. a plugin/theme conflict during the wp_mail() request
    3. a server-level security rule such as ModSecurity/WAF blocking the request

    Could you please do the following and share the result?

    • Enable WordPress debug logging, reproduce the issue once, and send us the exact lines written to /wp-content/debug.log at the time of the failed test.
    • If debug.log stays empty, please ask your host to check the server error log / ModSecurity log for that same request.
    • Please also confirm whether the site is multilingual (WPML/Polylang or language-prefixed URLs). If yes, that is especially relevant for Microsoft 365 because Microsoft requires the redirect URI to match exactly, and multilingual callback URLs are a known source of Outlook authorization issues.

    As an Office 365 sanity check, please also verify:

    • the token was generated with the same mailbox that is used as the sender address
    • the mailbox has an active Microsoft 365 license
    • the Azure app has the required Microsoft Graph delegated permissions and admin consent

    Once you share the debug/server log entry, we can usually pinpoint the exact cause very quickly.

    Thank you

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @technicalx ,

    Apologies for the delayed reply.

    It looks like the PDO and PDO_MYSQL PHP extensions are missing on your server. In that case, FluentSMTP may fail before it can return a proper AJAX error response, which can make the “Send Test Email” button appear to hang.

    So, you can ensure that the pdo and pdo_mysql PHP extensions are enabled on your server. On many hosting providers, this can be done through cPanel or Plesk, or by contacting your hosting provider and asking them to enable these extensions.

    Once they are enabled, FluentSMTP should be able to use its logging and database layer normally.

    I’ll also share this with our development team so they can review the behavior and make any improvements if needed.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @shanekryme ,

    Apologies for the delay in replying. For FluentSMTP, you should not choose Single tenant for this setup.

    Instead, we recommend selecting Any Entra ID tenant + Personal Microsoft accounts. This is Microsoft’s current wording for what was previously called the Multitenant + Personal Microsoft accounts option.

    FluentSMTP’s Microsoft mailer currently uses Microsoft’s /common OAuth endpoints, so it is designed to work with a multitenant-style app registration rather than a tenant-specific (single-tenant) application.

    If you’re only using a Microsoft 365 work or school mailbox, Any Entra ID tenant may also work. However, Single tenant is not the recommended option for FluentSMTP’s default Outlook/Microsoft 365 connection flow.

    Also, please make sure the following settings are configured correctly:

    • Platform: Web
    • Redirect URI: https://yourdomain.com/wp-json/fluent-smtp/outlook_callback

    If authentication still fails after making these changes, please share the exact error message or a screenshot, and we’ll be happy to guide you further.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @awr10e ,

    Sorry you’re running into this.

    The 422 Unauthorized here is usually coming from the Microsoft auth/token validation step, not from the Disable Encryption option. The Outlook / Microsoft 365 connection in FluentSMTP uses Microsoft Graph API, so SMTP encryption settings generally won’t affect this part.

    Since the emails stopped on July 15, 2026 and re-authentication is also failing now, the first thing I’d check is the Microsoft app registration:

    1. In Microsoft Entra / Azure > App registrations > Certificates & secrets, confirm the client secret is still valid and that you copied the Client Secret Value, not the Secret ID.
    2. In Authentication, make sure the Redirect URI exactly matches the callback URL shown in FluentSMTP, for example:
      https://yourdomain.com/wp-json/fluent-smtp/outlook_callback
    3. Please confirm you are authenticating with the same Microsoft 365 mailbox that is set as the sender / From email in FluentSMTP.
    4. Make sure the app is still enabled and the required Microsoft Graph permissions are granted.

    After checking those, please disconnect/reconnect the Microsoft connection, generate a fresh auth code, save it again, and test once more.

    If it still returns 422, please share the full Microsoft/AADSTS error you see during the auth step or a screenshot from the browser network response. That will help us tell whether this is a secret expiry, redirect URI mismatch, or tenant permission issue.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @lyk-1 ,

    Thanks for sharing this. You’re right: ses:ListIdentities is not required by Amazon SES for sending emails.

    In the current FluentSMTP SES setup, we use that permission during connection setup to fetch SES identities and show helper information such as available sender emails / verified domain details. However, the actual mail delivery path uses SES SendRawEmail, and AWS itself validates the sender identity when the message is sent. So for runtime email delivery, a send-only policy is the right least-privilege direction.

    Also, ListIdentities may expose SES identity information from the AWS account, and it should not be a hard requirement for users who only want FluentSMTP to send WordPress emails.

    For the current version, you may need to grant ses:ListIdentities temporarily while saving the SES connection, then remove it afterward and keep ses:SendRawEmail / ses:SendEmail for sending. Some dashboard helper details, sender discovery, or quota/identity information may not be available without read/list permissions, but sending should work with the send permission.

    We agree this can be improved. We’ll treat ListIdentities and related read permissions as diagnostics instead of mandatory setup requirements, and we’ll review the AWS guide so users can choose a least-privilege send-only policy instead of broad full-access permissions.

    Thanks again for the thoughtful report.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @albertoarias ,

    You can use a shared Office 365 mailbox as the sender address, but not by logging in directly as that shared mailbox.

    Since shared mailboxes normally don’t have a usable password and Microsoft recommends keeping their sign-in blocked, FluentSMTP cannot authenticate directly with the shared mailbox account. Instead, please configure the Outlook/Office 365 API connection using a regular licensed Microsoft 365 user account, then grant that user permission to send from the shared mailbox.

    Recommended setup:

    1. In Microsoft 365/Exchange Admin, grant the authenticated user Send As permission for the shared mailbox. Use Send on behalf only if you are okay with recipients seeing “sent on behalf of”.
    2. In FluentSMTP, choose the Outlook/Office 365 mailer.
    3. Set the From Email to the shared mailbox address.
    4. During authentication, sign in with the licensed user account, not the shared mailbox.
    5. Re-authenticate after permissions are added, then send a test email.

    If they are using the “OtherSMTP” option with smtp.office365.com, that will not work for a passwordless shared mailbox because SMTP AUTH requires an account that can authenticate.

    If they still get a send error like ErrorSendAsDenied, it usually means the Microsoft 365 user used during authentication does not yet have Send As/Send on behalf permission for that shared mailbox, or the permission has not propagated yet.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @puregraphx ,

    This error means FluentSMTP can reach the SMTP server, but PHP/OpenSSL is rejecting the SMTP server’s SSL/TLS certificate during the encrypted handshake: stream_socket_enable_crypto(): certificate verify failed

    So this is not a password/authentication failure. It usually happens when the SMTP server certificate is expired, self-signed, missing an intermediate certificate, issued for a different hostname, or when the VPS has an outdated CA certificate bundle.

    Because all FluentSMTP sites on the same VPS started failing at the same time, the most likely causes are:

    1. The mail server’s SSL certificate expired or was renewed incorrectly.
    2. The SMTP hostname in FluentSMTP does not match the certificate name. For example, using mail.domain.com while the certificate is only valid for server.hostname.com.
    3. The mail server is not serving the full certificate chain.
    4. The VPS/PHP CA bundle is outdated.
    5. FluentSMTP is using TLS/STARTTLS while PostSMTP is using a different setting or bypassing SSL verification.

    Please ask the VPS/mail server admin to test the SMTP certificate from the server:

    openssl s_client -starttls smtp -connect SMTP_HOST:587 -servername SMTP_HOST -verify_return_error -showcerts

    For SSL port 465:

    openssl s_client -connect SMTP_HOST:465 -servername SMTP_HOST -verify_return_error -showcerts

    They should check the certificate expiry date, subject/SAN hostname, issuer chain, and final verify result. The fix is to install/renew a valid certificate for the exact SMTP hostname, serve the full chain, and update the server CA bundle if needed. Also make sure the FluentSMTP settings use the correct pair: TLS with port 587, or SSL with port 465.

    As a temporary diagnostic only, if the connection is set to “None” encryption and Auto TLS is enabled, disabling Auto TLS may confirm that the issue is with STARTTLS certificate verification. We do not recommend using that as a permanent fix if SMTP authentication is enabled, because credentials/email may be sent without proper TLS protection.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @khanhvo ,

    From FluentSMTP’s side, there is no daily optimization/health-check routine that resets SendGrid or falls back permanently to PHP Mailer.

    FluentSMTP’s daily cron hook is fluentmail_do_daily_scheduled_tasks, and it only handles email-log cleanup and the optional email digest. It does not update or delete connection settings. SendGrid timeouts/failures also do not remove the connection; they are logged, and if a fallback connection is configured, FluentSMTP may try that for the failed send only.

    The settings are stored in one WordPress option: fluentmail-settings

    So if the SendGrid connection disappears after midnight, the most likely causes are:

    1. That option row is being overwritten/deleted by a backup, sync, staging/live deployment, security cleanup, or DB restore process.
    2. Redis/object cache is serving an old copy of that option after a cache flush/rebuild.
    3. WordPress auth salts changed, breaking decryption of the stored API key. This would normally make the connection invalid, not delete it.

    Best next steps:

    • Right after saving SendGrid, export/check wp_options.option_name = 'fluentmail-settings'.
    • Check it again immediately after midnight.
    • If the DB row changed, something external is overwriting the option.
    • If the DB row is still correct but FluentSMTP shows PHP Mailer, flush Redis/object cache and recheck.

    You can also add temporary logging around updated_option, added_option, and deleted_option for fluentmail-settings to capture the exact request/cron/user that changes it.

    Thank you.

    Plugin Support Ariful Islam

    (@arifulislam1)

    Hi @macpheeweb ,

    The reason this may happen is that the Email Logs search currently searches only the main log fields: recipient, sender, and subject.

    With Contact Form 7, the visitor/customer name or email might not get stored as the actual email recipient or sender. Instead, it is commonly included inside the email body, or sometimes in the Reply-To header. That’s why you can open the log and see the customer details in the message, but a regular search for that name or email may not return the corresponding log entry.

    As a workaround, if the customer name or email appears in the message body, you can try searching using: body:customer@email.com or: body:Customer Name . This tells FluentSMTP to search specifically within the email body.

    Your suggestion about adding a Name / Email column is a good one. At the moment, FluentSMTP does not store a separate customer name or email field because it logs outgoing WordPress emails in a generic way, and each form plugin structures those fields differently.

    However, I’ve shared your suggestion as a feature request with our product team. Hopefully, it will be considered in future updates.

    Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)