Why WordPress Email Fails by Default
WordPress uses the PHP mail() function to send all outgoing emails, including registration confirmations, password resets, comment notifications, contact form submissions, and WooCommerce order receipts. While this approach works in theory, it fails in practice for the majority of WordPress installations. Understanding why this happens is the first step toward fixing your WordPress email delivery permanently.
The PHP mail() function relies on the server's local mail transfer agent, typically Sendmail or Postfix, to handle outgoing messages. On most shared hosting environments, these local mail agents are either poorly configured, severely rate-limited, or disabled entirely. Even when they function, emails sent through mail() lack proper authentication. They are sent without SPF alignment, without DKIM signatures, and without any connection to a reputable sending infrastructure. Major email providers like Gmail, Outlook, and Yahoo have increasingly strict spam filters that flag or reject unauthenticated messages outright.
The result is predictable: your WordPress site sends an email, the PHP function reports success, but the message never reaches the intended recipient. It either lands in the spam folder, gets silently dropped by the receiving server, or bounces with a cryptic error that WordPress never surfaces to you. There is no delivery confirmation, no bounce tracking, and no way to diagnose what went wrong because the PHP mail() function provides almost no feedback beyond a boolean true or false return value. For a general overview of SMTP configuration across platforms, see our SMTP server setup guide.
This problem affects every type of WordPress email. New user registration emails disappear, causing frustrated visitors who cannot activate their accounts. Password reset links never arrive, locking users out of their own accounts. WooCommerce order confirmations fail silently, creating support tickets and eroding customer trust. Contact form submissions vanish, costing you leads and business opportunities. The underlying issue is always the same: WordPress was not designed with reliable email delivery in mind, and the PHP mail() function was never intended for production email sending.
What Is WP Mail SMTP and Why You Need It
WP Mail SMTP is a WordPress plugin that overrides the default PHP mail() function and routes all outgoing email through an authenticated SMTP server instead. Rather than handing emails to your hosting server's local mail agent, WP Mail SMTP connects directly to a professional SMTP service like QUEENSMTP, authenticates with your credentials, and delivers the message through infrastructure that is purpose-built for email delivery.
When you configure a WordPress SMTP plugin, every email your site generates, regardless of which plugin or core function triggered it, is sent through the SMTP connection. This means your emails benefit from proper SPF and DKIM authentication, dedicated IP reputation, TLS encryption, and delivery optimization that your hosting server simply cannot provide. The receiving mail server sees the message coming from a legitimate, authenticated source rather than an anonymous shared hosting IP address with no sending history.
The term "WP Mail SMTP" refers both to the concept of using SMTP in WordPress and to the specific plugin called WP Mail SMTP by WPForms, which is the most popular SMTP plugin in the WordPress ecosystem with over 3 million active installations. However, there are several alternative plugins that accomplish the same goal, including Post SMTP, FluentSMTP, and Easy WP SMTP. We compare these options in detail later in this guide.
The fundamental change that any SMTP plugin makes is replacing the wp_mail() function's transport layer. Instead of calling PHP mail(), the plugin uses the PHPMailer library that is bundled with WordPress core and configures it to connect to your SMTP server. This is not a hack or a workaround. PHPMailer is already included in WordPress and is the recommended way to send email programmatically. The SMTP plugin simply provides the configuration interface and ensures the connection parameters are set correctly for every outgoing message.
Step-by-Step: Setting Up QUEENSMTP with WordPress
Configuring QUEENSMTP as your WordPress SMTP provider takes about ten minutes. This guide uses the WP Mail SMTP plugin, but the SMTP settings are the same regardless of which plugin you choose. Follow each step carefully to ensure proper configuration.
Step 1: Create Your QUEENSMTP Account
Visit queensmtp.com and sign up for an account. The Starter plan at $9 per month includes 50,000 emails, which is more than sufficient for most WordPress sites. Learn more about all available options on our SMTP service page. After creating your account, navigate to the Dashboard and complete the domain authentication process. Add your WordPress site's domain, then add the SPF, DKIM, and DMARC records to your DNS as instructed. QUEENSMTP verifies these records automatically within minutes of propagation.
Step 2: Install and Activate WP Mail SMTP
In your WordPress admin panel, go to Plugins, then Add New, and search for "WP Mail SMTP." Install the plugin by WPForms and activate it. You will see a new "WP Mail SMTP" item in your left sidebar menu. Click it to open the settings page. If you prefer a different SMTP plugin, you can install Post SMTP or FluentSMTP instead; the SMTP configuration values will be the same.
Step 3: Configure the From Email and Name
In the WP Mail SMTP settings, set the "From Email" to a valid email address on your authenticated domain, such as notifications@yourdomain.com or noreply@yourdomain.com. Check the box to force this From Email for all outgoing messages so that no plugin can override it with a different address. Set the "From Name" to your business name or website name, and optionally force it as well. Using a consistent From address and name improves deliverability and brand recognition.
Step 4: Select "Other SMTP" as the Mailer
Scroll down to the Mailer section and select "Other SMTP." This option allows you to enter custom SMTP server credentials, which is what we need for QUEENSMTP. Some SMTP plugins have built-in integration options for services like SendGrid or Mailgun, but using the generic SMTP option gives you full control over the connection settings.
Step 5: Enter QUEENSMTP SMTP Settings
Enter the following SMTP configuration values from your QUEENSMTP dashboard. These are the standard settings for all QUEENSMTP accounts.
SMTP Host: smtp.queensmtp.com
SMTP Port: 587
Encryption: TLS (STARTTLS)
Authentication: On
Username: your-queensmtp-username
Password: your-queensmtp-api-key
Your SMTP username and API key are available in the QUEENSMTP dashboard under Settings, then SMTP Credentials. Copy and paste these values exactly. Do not include any spaces before or after the credentials. Select TLS as the encryption method and ensure authentication is toggled on.
Step 6: Save Settings and Send a Test Email
Click "Save Settings" at the bottom of the page. Then navigate to the "Email Test" tab in WP Mail SMTP. Enter your personal email address and click "Send Test." You should receive the test email within seconds. If the test succeeds, your WordPress site is now configured to send all emails through QUEENSMTP. If the test fails, check the error message and refer to the troubleshooting section below.
// wp-config.php - QUEENSMTP SMTP credentials
define( 'WPMS_ON', true );
define( 'WPMS_SMTP_HOST', 'smtp.queensmtp.com' );
define( 'WPMS_SMTP_PORT', 587 );
define( 'WPMS_SSL', 'tls' );
define( 'WPMS_SMTP_AUTH', true );
define( 'WPMS_SMTP_USER', 'your-queensmtp-username' );
define( 'WPMS_SMTP_PASS', 'your-queensmtp-api-key' );
define( 'WPMS_MAIL_FROM', 'notifications@yourdomain.com' );
define( 'WPMS_MAIL_FROM_FORCE', true );
define( 'WPMS_MAIL_FROM_NAME', 'Your Business Name' );
define( 'WPMS_MAIL_FROM_NAME_FORCE', true );
WordPress SMTP Plugin Comparison
There are several quality SMTP plugins available for WordPress. Each one overrides the default PHP mail function and routes email through your SMTP server, but they differ in features, interface design, and additional capabilities. Here is a detailed comparison of the four most popular options to help you choose the right one for your site.
| Feature | WP Mail SMTP | Post SMTP | FluentSMTP | Easy WP SMTP |
|---|---|---|---|---|
| Active Installations | 3M+ | 400K+ | 200K+ | 600K+ |
| Email Logging | Pro only | Free | Free | Pro only |
| Failure Alerts | Pro only | Free | No | No |
| Multiple Mailer Connections | Pro only | No | Free | No |
| OAuth 2.0 Support | Yes | Yes | No | No |
| wp-config.php Constants | Yes | Limited | No | Yes |
| Built-in SMTP Providers | 10+ | 5 | 8 | 4 |
| Price (Pro) | $49/yr | Free | Free | $49/yr |
| Best For | Widest compatibility | Free email logging | Multiple SMTP connections | Simple configuration |
WP Mail SMTP is the most widely used option and offers the broadest compatibility with WordPress hosting environments and third-party plugins. The free version handles basic SMTP configuration well, but advanced features like email logging, failure notifications, and backup connections require the Pro license at $49 per year. It supports the widest range of built-in mailer providers and offers the most polished setup wizard.
Post SMTP stands out by offering email logging and failure alerts completely free. Every email sent through your WordPress site is recorded with its status, recipient, subject, and full content. If an email fails to send, Post SMTP can notify you via email or Slack. This makes it an excellent choice for site owners who need delivery visibility without paying for a premium plugin. The Chrome extension for push notifications is a unique feature not found in other plugins.
FluentSMTP is entirely free with no premium version, and its standout feature is the ability to configure multiple SMTP connections and route different types of emails through different providers. For example, you could send transactional emails through QUEENSMTP and marketing notifications through a different service. The email logging interface is clean and modern, and the plugin is lightweight with minimal performance impact.
Easy WP SMTP focuses on simplicity. The configuration interface is straightforward with minimal options, making it a good choice for beginners who want to set up SMTP without being overwhelmed by advanced settings. It supports wp-config.php constants for secure credential storage and includes basic debugging tools for troubleshooting connection issues.
Fixing WooCommerce Email Delivery with SMTP
WooCommerce generates a high volume of transactional emails that are critical to the customer experience. Order confirmations, shipping notifications, refund receipts, account creation emails, and password resets all flow through the WordPress email system. When these emails fail to deliver, it directly impacts your revenue and customer satisfaction. Customers who do not receive order confirmations lose confidence in their purchase. Missing shipping notifications generate support tickets. Failed password resets prevent repeat purchases.
The good news is that WooCommerce uses the standard WordPress wp_mail() function for all its emails. This means that once you configure an SMTP plugin with QUEENSMTP, every WooCommerce email is automatically routed through the authenticated SMTP connection. There is no additional WooCommerce-specific configuration required for basic SMTP functionality.
However, there are several WooCommerce-specific considerations. First, WooCommerce emails use HTML templates that can be quite large, especially order confirmation emails with multiple line items, product images, and detailed shipping information. Ensure your SMTP service can handle the message size without truncation. QUEENSMTP supports messages up to 25MB, which is well beyond what any WooCommerce email would require.
Second, WooCommerce sends emails at specific trigger points during the order lifecycle. Some hosting environments throttle outgoing email connections, which can delay order status emails. With QUEENSMTP, emails are queued and delivered within seconds regardless of your hosting environment's limitations because the SMTP connection bypasses local mail restrictions entirely.
Third, you should verify that the "From" email address in your SMTP plugin matches the email address configured in WooCommerce under Settings, then Emails. If these addresses differ, some email clients may display a "via" notice or flag the message as potentially spoofed. Set both to the same authenticated domain address for consistent delivery.
// Force WooCommerce to use authenticated from address
// Add to your theme's functions.php or a custom plugin
add_filter( 'woocommerce_email_from_address', function( $from_email ) {
return 'orders@yourdomain.com';
});
add_filter( 'woocommerce_email_from_name', function( $from_name ) {
return 'Your Store Name';
});
SMTP for Contact Form 7 and Form Plugins
Contact forms are one of the most common sources of email delivery failures in WordPress. Contact Form 7, WPForms, Gravity Forms, and Ninja Forms all rely on wp_mail() to send form submissions. When these emails fail, you lose leads, customer inquiries, and business opportunities, often without knowing it because neither you nor the form submitter receives any error notification.
Once you have configured your SMTP plugin with QUEENSMTP, all form plugin emails are automatically routed through SMTP. However, there are specific optimizations for form plugins that improve delivery reliability.
Contact Form 7 allows you to customize the From address, Reply-To address, and additional headers directly in the form's Mail tab. Set the From field to your authenticated domain email and use the submitter's email address as the Reply-To. This prevents deliverability issues while allowing you to reply directly to the person who submitted the form.
// Contact Form 7 - Mail Tab Configuration
From: Your Site Name <notifications@yourdomain.com>
Reply-To: [your-email]
To: inbox@yourdomain.com
Subject: New Contact Form Submission: [your-subject]
// Do NOT use [your-email] in the From field
// This causes SPF/DKIM failures and spam filtering
A common mistake with Contact Form 7 is setting the From address to the visitor's email address using the form field tag. This causes the email to fail SPF and DKIM checks because you are sending from your SMTP server but claiming to be from the visitor's domain. Always use your own authenticated domain in the From field and put the visitor's address in Reply-To.
WPForms, Gravity Forms, and Ninja Forms all have similar settings. The principle is the same: use your authenticated domain for the From address, and use Reply-To for the form submitter's email address. Most modern form plugins follow this best practice by default, but it is worth verifying in your form notification settings.
WordPress Multisite SMTP Configuration
WordPress multisite installations present unique challenges for SMTP configuration because multiple sites share the same WordPress installation but may need different sending identities or even different SMTP providers. There are two approaches to configuring SMTP across a multisite network, and the right choice depends on your specific setup.
Network-wide SMTP configuration is the simpler approach. You install and network-activate the SMTP plugin, then configure it once at the network level. All sites in the network share the same SMTP server credentials and From address. This works well when all sites are under the same brand and domain. With QUEENSMTP, you authenticate your primary domain and use a consistent From address like noreply@yourdomain.com across all network sites.
Per-site SMTP configuration is necessary when each site in the multisite network has its own domain and brand identity. In this scenario, you need each site to send email from its own authenticated domain through potentially different SMTP credentials. FluentSMTP handles this well by allowing per-site SMTP configuration in a multisite environment. Alternatively, you can use wp-config.php constants combined with domain-based conditional logic.
// wp-config.php - Multisite per-domain SMTP configuration
// Determine the current site's domain for SMTP settings
$current_domain = $_SERVER['HTTP_HOST'] ?? 'default.com';
switch ( $current_domain ) {
case 'site-one.com':
define( 'WPMS_SMTP_USER', 'site-one-smtp-user' );
define( 'WPMS_MAIL_FROM', 'hello@site-one.com' );
break;
case 'site-two.com':
define( 'WPMS_SMTP_USER', 'site-two-smtp-user' );
define( 'WPMS_MAIL_FROM', 'hello@site-two.com' );
break;
default:
define( 'WPMS_SMTP_USER', 'default-smtp-user' );
define( 'WPMS_MAIL_FROM', 'hello@default.com' );
}
// Shared QUEENSMTP settings
define( 'WPMS_SMTP_HOST', 'smtp.queensmtp.com' );
define( 'WPMS_SMTP_PORT', 587 );
define( 'WPMS_SSL', 'tls' );
define( 'WPMS_SMTP_AUTH', true );
define( 'WPMS_SMTP_PASS', 'shared-or-per-site-api-key' );
With QUEENSMTP, you can authenticate multiple domains under a single account. This simplifies multisite configuration because all sites can share the same SMTP host and credentials while sending from their respective domain addresses. Each domain needs its own SPF, DKIM, and DMARC records, which you can set up through the QUEENSMTP dashboard's domain management interface.
Choosing the Right SMTP Port for WordPress Hosting
The SMTP port you use determines how your WordPress site connects to the SMTP server and whether the connection will be encrypted. Different hosting environments have different port restrictions, so choosing the correct port is essential for a successful SMTP configuration.
| Port | Encryption | Hosting Compatibility | Recommendation |
|---|---|---|---|
| 587 | STARTTLS | Supported on most hosts | Recommended default for all WordPress SMTP configurations |
| 465 | SSL/TLS (implicit) | Widely supported | Use if port 587 is blocked or your plugin requires SSL |
| 2525 | STARTTLS | Alternative port | Use when both 587 and 465 are blocked by your host |
| 25 | None or STARTTLS | Blocked on most shared hosts | Avoid for WordPress; blocked by most hosting providers and ISPs |
Port 587 with STARTTLS is the recommended port for WordPress SMTP configuration. It is the IETF standard for authenticated email submission and is supported by virtually all hosting providers. The connection starts as plain text, then upgrades to TLS encryption through the STARTTLS command. QUEENSMTP fully supports port 587 and it is the default in all our WordPress configuration guides.
Port 465 with implicit SSL/TLS establishes an encrypted connection from the start rather than upgrading. Some WordPress SMTP plugins label this as "SSL" in their encryption dropdown. Port 465 is a good alternative if port 587 does not work on your host, and QUEENSMTP supports it fully.
Port 2525 is an unofficial alternative that some SMTP providers, including QUEENSMTP, support for environments where standard ports are restricted. Some managed WordPress hosts and enterprise firewalls block ports 587 and 465, making 2525 the only option. It uses STARTTLS encryption just like port 587.
Port 25 is the original SMTP port but is blocked by nearly all shared hosting providers and cloud platforms to prevent spam abuse. Do not attempt to use port 25 for WordPress SMTP; it will almost certainly fail.
Troubleshooting WordPress SMTP Issues
Even with correct configuration, you may encounter SMTP issues in WordPress. Here are the most common problems, their causes, and proven solutions.
Error: "Could not authenticate" or "Authentication failed"
This error means the SMTP server rejected your username or password. Double-check that you are using the SMTP credentials from your QUEENSMTP dashboard, not your account login password. Ensure there are no trailing spaces in the username or password fields. If you are using wp-config.php constants, make sure the values are enclosed in single quotes and contain no special characters that might be interpreted by PHP.
Error: "Connection timed out" or "Could not connect to SMTP host"
This usually indicates that your hosting provider is blocking the SMTP port. Try switching from port 587 to port 465, or to port 2525. If all ports fail, contact your hosting provider to ask whether they block outbound SMTP connections. Some hosts require you to whitelist specific IP addresses or request SMTP access explicitly. On managed WordPress platforms like Kinsta, WP Engine, or Flywheel, outbound SMTP is typically allowed but may require port 2525.
// Test SMTP port connectivity from your server
// Run this via SSH or a PHP script in your WordPress root
// PHP test script (smtp-test.php)
<?php
$host = 'smtp.queensmtp.com';
$ports = [587, 465, 2525, 25];
foreach ($ports as $port) {
$connection = @fsockopen($host, $port, $errno, $errstr, 5);
if ($connection) {
echo "Port $port: OPEN\n";
fclose($connection);
} else {
echo "Port $port: BLOCKED ($errstr)\n";
}
}
Error: "SMTP Error: data not accepted"
This error occurs after the SMTP connection is established but the server rejects the message content. Common causes include an invalid or unauthenticated From address, a message that exceeds size limits, or content that triggers spam filters. Verify that your From address uses a domain that is authenticated in your QUEENSMTP account. If you are sending emails with large attachments, check whether the total message size exceeds your SMTP server's limit.
Error: "Certificate verification failed" or "SSL/TLS handshake failed"
This indicates a TLS certificate issue between your server and the SMTP server. It commonly occurs on servers running outdated versions of PHP or OpenSSL. Ensure your server runs PHP 7.4 or later and that the CA certificate bundle is up to date. In some cases, you may need to temporarily set the SMTP plugin to not verify the peer certificate, though this is not recommended for production environments.
Emails Send but Arrive in Spam
If your SMTP connection is working but emails still land in spam, the issue is usually related to authentication or content. Verify that your SPF, DKIM, and DMARC records are properly configured by using the QUEENSMTP domain verification tool. Check that your From address domain matches your authenticated domain. Review your email content for spam trigger words, excessive links, or missing unsubscribe headers in marketing emails. QUEENSMTP's dashboard provides deliverability reports that show how ISPs are treating your messages.
SMTP for Different WordPress Hosting Environments
Your WordPress hosting environment affects which SMTP configuration works and what limitations you may encounter. Here is how to approach SMTP setup for the three most common hosting types.
Shared Hosting (SiteGround, Bluehost, HostGator, GoDaddy)
Shared hosting is the most common environment for WordPress sites and also the most problematic for email delivery. These hosts typically run many websites on a single server with a shared IP address, which means your email reputation is affected by every other site on the same server. Most shared hosts limit outgoing email to 100-500 messages per hour and may block certain SMTP ports.
With QUEENSMTP on shared hosting, use port 587 with TLS encryption as your first choice. If port 587 is blocked, try port 465 with SSL. The key advantage of using an external SMTP service on shared hosting is that you completely bypass the shared server's mail system and its damaged reputation. Your emails are sent from QUEENSMTP's dedicated infrastructure with clean IP addresses, regardless of what the other sites on your shared server are doing.
VPS and Cloud Hosting (DigitalOcean, Linode, Vultr, AWS EC2)
VPS and cloud environments give you more control but often block port 25 by default to prevent spam. DigitalOcean, for example, blocks port 25 on all new droplets and requires you to request removal of the block through support. Ports 587 and 465 are typically open, making them the preferred choice for SMTP configuration.
On a VPS, you have the option of running your own mail server, but this is strongly discouraged for WordPress email. Managing a mail server requires ongoing maintenance, IP reputation management, and compliance with anti-spam best practices. Using QUEENSMTP eliminates this overhead entirely while providing better deliverability than a self-managed mail server can achieve.
Managed WordPress Hosting (Kinsta, WP Engine, Flywheel, Cloudways)
Managed WordPress hosts optimize their infrastructure for WordPress performance but typically limit or disable native email sending. Many of these hosts explicitly recommend using a third-party SMTP service. WP Engine, for example, blocks all outgoing email on port 25 and recommends using port 587 or 2525 with an external provider. Kinsta allows outbound SMTP on standard ports but caps sending at 1,500 emails per day from their servers.
QUEENSMTP works seamlessly with all major managed WordPress hosts. Configure your SMTP plugin with port 587 or 2525 depending on your host's documentation, and all WordPress emails will bypass the host's email restrictions entirely.
Email Logging and Debugging in WordPress
Email logging is essential for WordPress sites that depend on reliable email delivery. Without logging, you have no way to confirm whether an email was actually sent, what the content was, or why it might have failed. There are two levels of logging to consider: plugin-level logging and SMTP server-level logging.
Plugin-level logging records every email that WordPress attempts to send, including the recipient, subject, content, headers, and sending status. Post SMTP and FluentSMTP both offer free email logging. WP Mail SMTP includes logging in its Pro version. These logs are stored in your WordPress database and accessible through the admin panel. They are invaluable for diagnosing issues like missing form submissions, failed WooCommerce notifications, or emails sent to incorrect addresses.
SMTP server-level logging provides delivery tracking beyond what the WordPress plugin can see. When your plugin logs show that an email was successfully handed to the SMTP server, the QUEENSMTP dashboard shows you what happened next: whether the email was delivered, deferred, bounced, opened, or marked as spam. This two-layer visibility gives you complete end-to-end tracking from the moment WordPress generates the email to the moment it reaches the recipient's inbox.
For debugging SMTP connection issues, enable debug mode in your SMTP plugin. WP Mail SMTP and Post SMTP both include debug logging that shows the raw SMTP conversation between your server and the SMTP server. This includes the EHLO handshake, authentication exchange, STARTTLS negotiation, and any error codes returned by the server. This raw output is extremely helpful when troubleshooting connection failures, authentication errors, or TLS issues.
// Enable WordPress email debugging via wp-config.php
// Add these lines before "That's all, stop editing!"
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
// PHPMailer debug output (levels 0-4)
// 0 = off, 1 = client, 2 = client+server, 3 = verbose, 4 = low-level
add_action( 'phpmailer_init', function( $phpmailer ) {
$phpmailer->SMTPDebug = 2;
$phpmailer->Debugoutput = function( $str, $level ) {
error_log( "SMTP DEBUG: $str" );
};
});
Performance Impact of SMTP Plugins
A common concern among WordPress site owners is whether SMTP plugins slow down their website. The short answer is no, not in any meaningful way, but the nuance is worth understanding.
SMTP plugins only activate when WordPress sends an email. They do not add overhead to regular page loads, admin panel operations, or any other WordPress function that does not involve sending email. The plugin hooks into the wp_mail() function and only executes when that function is called. During a normal page load, the plugin's impact is effectively zero because no email is being sent.
When an email is triggered, such as a user submitting a contact form or WooCommerce processing an order, the SMTP plugin opens a connection to the SMTP server, authenticates, transmits the message, and closes the connection. This process typically takes 200 to 500 milliseconds, which is imperceptible to the user. The SMTP connection runs server-side and does not affect front-end page rendering or JavaScript execution.
For sites that send a high volume of emails simultaneously, such as WooCommerce stores processing many orders during a sale, the sequential nature of SMTP sending can create a bottleneck. Each email requires its own connection cycle. To handle this, QUEENSMTP supports connection pooling and persistent SMTP connections, which allow multiple emails to be sent over a single connection without the overhead of repeated authentication. Some SMTP plugins, particularly Post SMTP, support asynchronous sending through background cron jobs, which prevents email sending from blocking the user's request.
Email logging plugins do add a small amount of database write overhead for each email sent. Over time, if you send thousands of emails per day, the log table can grow large and should be pruned periodically. Both Post SMTP and FluentSMTP include auto-cleanup options that delete logs older than a configurable number of days, preventing database bloat.