Hi! Welcome to the forum! You need SMTP server before using the PHPMailer library. You can use SMTP server from the Google Mail to send emails. You can follow the example from Admin:
Simple contact form with PHPMailer
Outgoing email with PHP mail() is heavily restricted on InfinityFree. Fortunately, you can still whatever email you want using an external email service.
There are many external email providers to choose from. InfinityFree doesn’t restrict sending email with external providers. Almost all of them have paid plans, but some have free tiers too. Most of them support sending email over SMTP, some of them have custom APIs, libraries and plugins which you can use too.
A simple way to get started qui…
The most common way to send email from your website is by using the PHP mail() function. PHP mail() is an easy to use email system built into the PHP programming language. It’s the default setting for almost all applications.
However, PHP mail is severely restricted on InfinityFree. To prevent spam and other abuse, most messages sent through PHP mail are rejected by the mail system. In practice, this means you cannot use PHP mail on InfinityFree to send your email.
If you want to send email fr…
8 Likes