{"id":319,"date":"2025-05-16T10:15:46","date_gmt":"2025-05-16T10:15:46","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2025\/05\/16\/11393648-php-mail-limitation-explained-how-to-improve-email-delivery-with-smtp\/"},"modified":"2025-05-16T10:15:46","modified_gmt":"2025-05-16T10:15:46","slug":"11393648-php-mail-limitation-explained-how-to-improve-email-delivery-with-smtp","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/11393648-php-mail-limitation-explained-how-to-improve-email-delivery-with-smtp\/","title":{"rendered":"PHP Mail Limitation Explained: How to Improve Email Delivery With SMTP"},"content":{"rendered":"<p class=\"no-margin\">Sending emails using simple PHP functions like mail() might seem like an easy solution for contact forms or website notifications. However, this method is very outdated and has <b>severe limitations<\/b> when it comes to <b>security and deliverability<\/b>.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Emails sent via php mail() often <b>lack proper authentication headers<\/b>, which makes them more likely to be <b>flagged as spam or rejected entirely<\/b> by the receiving server. <\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">To address this and protect the integrity of our services, we have implemented specific limitations on unauthenticated mail sent via PHP.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_9dbf7abbae\"><b>Understanding the Limitation<\/b><\/h2><p class=\"no-margin\">To maintain high email deliverability standards and prevent abuse, Hostinger limits outgoing emails sent through unauthenticated methods like php mail(). These measures are in place to:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>Protect email reputation:<\/b> Emails sent this way often skip necessary authentication (SPF, DKIM, and DMARC) checks, making these messages more likely to be filtered as spam.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Ensure security:<\/b> Spammers often exploit basic PHP mail functions to send bulk emails. By requiring stronger authentication methods, we help protect you and your users.<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">As a result, if you&rsquo;re using php mail() or similar simple mail functions, you may find that some emails are not being delivered as expected if they exceed our limits of:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>Per minute<\/b>: Max 10 emails<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Daily<\/b>: Max 100 emails<\/p>\n<\/li>\n<\/ul><h2 id=\"h_11d2e49285\"><b>How to Improve Email Sending<\/b><\/h2><p class=\"no-margin\">Instead of using basic PHP functions, we strongly recommend sending emails via SMTP &mdash; a more secure and authenticated method. There are two easy ways to do this:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>PHPMailer<\/b> or similar libraries [<a href=\"https:\/\/www.hostinger.com\/tutorials\/send-emails-using-php-mail#How_to_use_PHPMailer_to_send_emails\" target=\"_blank\" class=\"intercom-content-link\">How to use PHPMailer to send emails<\/a>]<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>SMTP plugins<\/b>, such as WP Mail SMTP  [<a href=\"https:\/\/www.hostinger.com\/tutorials\/wordpress-smtp\" target=\"_blank\" class=\"intercom-content-link\">What Is WordPress SMTP<\/a>&hellip; or <a href=\"https:\/\/laravel.com\/docs\/12.x\/mail\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Mail for Laravel<\/a>]<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">Since SMTP includes proper authentication, it increases the chance your emails reach inboxes while adhering to the email plan&rsquo;s outgoing limits. If you have our <a href=\"\/support\/4625828-parameters-and-limits-of-hostinger-email\" target=\"_blank\" class=\"intercom-content-link\">Business Starter or Business Premium email<\/a>, you will have at least a 10-times higher limit of daily outgoing messages, which means more prospects for inquiries on your website.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_cba7feb113\"><b>Monitor with the Sendmail Log<\/b><\/h2><p class=\"no-margin\">If you&rsquo;re sending emails through PHP scripts, it&rsquo;s crucial to monitor the number of emails sent especially when hitting limits.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">To help with that, each hosting account now includes a <b>Sendmail rate limit log<\/b>. This log lets you:<\/p><ul>\n<li>\n<p class=\"no-margin\">See which email addresses are sending the most<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Check when rate limits are triggered<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Track how fast the rate is dropping back toward normal<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">The log is available in your <b>File Manager<\/b> and is automatically updated hourly. Log path: <\/p><p class=\"no-margin\">\n<\/p><pre><code>\/home\/username\/.logs\/exim.log<\/code><\/pre><h4 id=\"h_feeda4b1b8\"><b>Example output<\/b>:<\/h4><pre><code>[2025-05-13 03:17:22] RATE LIMIT EXCEEDED - Mailbox: email@domain.com - Rate: 2935.7 (daily)<br>[2025-05-13 03:17:22] RATE LIMIT EXCEEDED - Mailbox: noreply@domain.com - Rate: 2936.7 (daily)<br><\/code><\/pre><h4 id=\"h_871f80643a\"><b>How to use the logs:<\/b><\/h4><ul>\n<li>\n<p class=\"no-margin\"><b>Timestamp: <\/b>[2025-05-13 03:17:22]<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Mailbox:<\/b> <a href=\"mailto:email@domain.com\" target=\"_blank\" class=\"intercom-content-link\">email@domain.com<\/a><\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Sending rate:<\/b> 2935.7 <\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Limit type<\/b>: (<b>daily<\/b> or per-minute)<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">This means <a href=\"mailto:email@domain.com\" target=\"_blank\" class=\"intercom-content-link\">email@domain.com<\/a> was sending at a rate of 2935.7 emails\/day, above the 100 daily limit.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_7c06315225\"><b>How the Limit Resets<\/b><\/h2><p class=\"no-margin\">The rate limit <b>gradually resets<\/b> as sending activity slows down. For example:<\/p><ul>\n<li>\n<p class=\"no-margin\">If no emails are sent for a while, the rate decreases. As the account nears compliance, you&rsquo;ll see fewer &ldquo;RATE LIMIT EXCEEDED&rdquo; lines.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">The restriction is automatically lifted once the rate drops below the allowed limit (<b>100\/day<\/b> or <b>10\/minute<\/b>).<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">&#128161; <b>Tip<\/b>: Check the log over time to:<\/p><ul>\n<li>\n<p class=\"no-margin\">Identify which email accounts are sending the most<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Spot peak sending times<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Know when the limit is close to resetting<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">This helps you take timely action &mdash; switch high-volume accounts to SMTP or adjust the timing of automated emails.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sendmail via PHP Is Limited: How to Monitor and Avoid Email Sending Issues<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[186],"tags":[],"class_list":["post-319","post","type-post","status-publish","format-standard","hentry","category-email-cpanel"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/11393648-php-mail-limitation-explained-how-to-improve-email-delivery-with-smtp\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}