<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to handle intermittent email failures with MessagingException in FusionAuth?]]></title><description><![CDATA[<p dir="auto">We're experiencing intermittent email delivery failures in FusionAuth for password resets and user signups. The event logs show errors like:</p>
<pre><code>Cause: jakarta.mail.MessagingException : Message: Exception reading response
</code></pre>
<p dir="auto">Our SMTP provider logs confirm that some emails are getting through successfully, so the issue appears to be intermittent rather than a complete outage.</p>
<p dir="auto"><strong>Questions:</strong></p>
<ol>
<li>What could be causing these intermittent <code>MessagingException</code> errors?</li>
<li>Does FusionAuth have a built-in retry mechanism for failed email sends?</li>
<li>What remediation steps can we take to improve email reliability?</li>
</ol>
]]></description><link>https://fusionauth.io/community/forum/topic/3237/how-to-handle-intermittent-email-failures-with-messagingexception-in-fusionauth</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 00:33:53 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/3237.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Oct 2026 16:57:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to handle intermittent email failures with MessagingException in FusionAuth? on Thu, 08 Oct 2026 16:57:11 GMT]]></title><description><![CDATA[<p dir="auto">This <code>MessagingException: Exception reading response</code> error is often related to network issues or SMTP timeout configuration. Here's how to address it:</p>
<h2>Check and Adjust SMTP Timeout Settings</h2>
<p dir="auto">The default SMTP timeout in FusionAuth is 2 seconds, which may be too short if your SMTP provider experiences occasional network slowness. You can increase the timeout by:</p>
<ol>
<li>Navigate to <strong>Tenants &gt; [Your Tenant] &gt; Edit &gt; Email &gt; Advanced</strong></li>
<li>In the <strong>Additional properties</strong> field, add or adjust these configuration values:</li>
</ol>
<pre><code class="language-properties">mail.smtp.timeout=5000
mail.smtp.connectiontimeout=5000
</code></pre>
<p dir="auto">This increases the timeout to 5 seconds. Adjust the value as needed based on your SMTP provider's typical response times. The Additional properties field can contain any Java mail property, and these values will override FusionAuth's defaults.</p>
<h2>Email Retry Policy</h2>
<p dir="auto"><strong>FusionAuth does not have a built-in retry mechanism for failed email sends.</strong> FusionAuth connects directly to your configured SMTP server at the tenant level without using a local mail queue. If an email fails to send due to a connection issue or timeout, FusionAuth will not automatically retry it.</p>
<h2>Additional Troubleshooting Steps</h2>
<ol>
<li>
<p dir="auto"><strong>Enable SMTP Debug Logging</strong>: In your tenant's Email settings, enable the <strong>Debug enabled</strong> option. This will provide detailed SMTP transaction logs in the FusionAuth event log, which can help identify the root cause of intermittent failures.</p>
</li>
<li>
<p dir="auto"><strong>Review Event Logs</strong>: Check <strong>System &gt; Event Log</strong> for error events. FusionAuth always creates an event log entry of type "Error" when it cannot send an email.</p>
</li>
<li>
<p dir="auto"><strong>Send Test Emails</strong>: Use the <strong>Send test email</strong> button in <strong>Tenants &gt; [Your Tenant] &gt; Email</strong> to verify your SMTP configuration under different conditions.</p>
</li>
</ol>
<h2>Implementing Your Own Retry Logic</h2>
<p dir="auto">To handle retries, you can set up a webhook-based solution:</p>
<ol>
<li>Configure a webhook for the <code>event-log.create</code> event</li>
<li>Monitor events delivered to your webhook endpoint</li>
<li>When you detect a <code>MessagingException</code> event, trigger an API call to the appropriate endpoint (e.g., <code>/api/user/forgot-password</code> for password reset emails)</li>
<li><strong>Important:</strong> Implement retry limits in your script to avoid infinite loops with invalid email addresses</li>
</ol>
<p dir="auto">This approach gives you full control over retry logic, backoff strategies, and error handling for failed email deliveries.</p>
<h2>Related Documentation</h2>
<ul>
<li><a href="https://fusionauth.io/docs/customize/email-and-messages/configure-email#smtp-settings" rel="nofollow ugc">Configure SMTP - SMTP Settings</a> - Complete SMTP configuration guide</li>
<li><a href="https://fusionauth.io/docs/get-started/core-concepts/tenants#smtp-settings-form-fields" rel="nofollow ugc">Tenants - SMTP Settings Form Fields</a> - Details on the Additional properties field and how to customize Java mail properties</li>
<li><a href="https://fusionauth.io/docs/operate/troubleshooting/#troubleshooting-email" rel="nofollow ugc">Troubleshooting Email</a> - Comprehensive email troubleshooting guide</li>
<li><a href="https://fusionauth.io/docs/extend/events-and-webhooks/events/event-log-create" rel="nofollow ugc">Event Log Create Event</a> - Documentation on the <code>event-log.create</code> webhook event for monitoring errors</li>
<li><a href="https://fusionauth.io/docs/apis/users/forgot-password" rel="nofollow ugc">Start Forgot Password Workflow API</a> - API endpoint for triggering password reset emails programmatically</li>
</ul>
]]></description><link>https://fusionauth.io/community/forum/post/8811</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/8811</guid><dc:creator><![CDATA[FASupportBot]]></dc:creator><pubDate>Thu, 08 Oct 2026 16:57:11 GMT</pubDate></item></channel></rss>