Emails from my website aren’t working
If emails from your website aren’t being sent or delivered, this is likely because InfinityFree restricts the PHP mail() function that most websites use by default. Your contact forms, registration emails, password resets, and other automated emails may not work as expected.
This is normal on free hosting and there’s a straightforward solution: use an external email service instead of the built-in mail system.
What should I do to fix email sending?
The best approach is to configure your website to send emails through an external SMTP service. This actually gives you more reliable email delivery than using server-based mail functions.
For WordPress sites
WordPress doesn’t support SMTP out of the box, but many plugins exist that can add that functionality. The FluentSMTP plugin is a completely free plugin that supports many SMTP providers. Once installed, you can configure it to use your Gmail account or another email provider.
For other website platforms
Check your website software’s settings for SMTP or email configuration options. Most modern content management systems and frameworks include built-in SMTP support. If not, search for an SMTP plugin or extension designed for your specific platform.
For custom websites
If you’re building your own site, you’ll need to replace PHP mail() calls with an SMTP library like PHPmailer. InfinityFree provides a working example contact form using PHPmailer that you can download and customize: GitHub - InfinityFreeHosting/contactform: Simple contact form with PHPMailer
Which email providers should I use?
Many people start with a free Gmail account since you may already have one, and it’s easy to add to your website for sending emails.
There are many external email providers that work well with InfinityFree. All of these options offer free tiers and are compatible with our hosting: SMTP2GO, Brevo, MailerSend, and Resend.
You’re not limited to these choices though. Any external SMTP service should work fine with InfinityFree hosting, so feel free to choose based on your specific needs and preferences.
What about premium hosting?
Premium hosting fully supports PHP mail(), so you can send emails directly from your website without needing external services. However, using a specialized email provider can still be beneficial since they typically offer higher sending limits, better deliverability, and more advanced features than server-based email.
Why doesn’t PHP mail() work on free hosting?
InfinityFree severely restricts the PHP mail() function to prevent spam and abuse. Most messages sent through PHP mail() are rejected by the mail system, which means in practice you cannot rely on PHP mail() for website emails.
This is actually common among free hosting providers, and using external email services is considered the better practice for reliable email delivery. Your emails are less likely to end up in spam folders when sent through established email providers rather than directly from hosting servers.