1. Home
  2. Email
  3. Email FAQs
  4. SMTP vs PHP mail(): Which One Should I Use?

SMTP vs PHP mail(): Which One Should I Use?

You will often find an application that purports to send mail through the server without needing SMTP credentials. The method this application probably uses is PHP mail(). Using PHP mail() function invokes a Sendmail program.

Using PHP mail has its own unique advantages in certain niche scenarios; however, at ChemiCloud, the application to deliver mail from your application, such as WordPress, is not recommended. There are several reasons for this.

Let’s take a look at some Pros and Cons of each option:

PHP mail Pros

  1. It’s integrated into a lot of applications out of the box.
  2. Because it’s been in use on Linux for so long, it’s also connected to the default MTA (if installed), making configuration relatively easy.

PHP mail Cons

  1. Sending mail via PHP mail means the messages dispatched will not benefit from the SPF and DKIM setup on your domain; therefore, the messages will likely be treated as spam by the receiving MTA (mail server).
  2. At ChemiCloud, if you are not on a VPS, there is a limit of 25 unauthenticated messages per hour, which means if you’re dispatching an email newsletter campaign, it will take a long time.
  3. Overall deliverability of email messages sent via PHP mail is not guaranteed.
  4. You won’t receive bounceback messages if there is a delivery failure.

While you’re comparing email delivery options, you should compare us to your current host. See why our platform is consistent, reliable, and one of the fastest in the industry. 🤓 Check out our web hosting plans!

SMTP Pros

  1. SMTP is a secure and proven technology.
  2. Mail sent using SMTP over your ChemiCloud email will travel through our MailChannels servers and be appropriately delivered to the recipient’s inbox instead of being treated as spam.
  3. Messages sent via SMTP will carry your DKIM and SPF signatures to notify receiving mail servers you really did send this message, and it was allowed to be sent from your domain.
  4. At ChemiCloud, you can send up to 300 messages per hour unless you are on a VPS.

SMTP Cons

  1. Integration into applications like WordPress may require an additional plugin.
  2. You need to create an additional user to authenticate with the SMTP server, which means another password you need to keep secure.

SMTP vs PHP mail(): Which One Should I Use?

As you can see, sending mail from your PHP application using SMTP is the better choice.

We hope this answers some questions for you, but if you still need assistance, be sure to open a live chat with our Happiness Engineers 24×7 or a ticket from your Client Area, and we’ll get you sorted!

Updated on April 4, 2022

Was this article helpful?

Related Articles

TRY CHEMICLOUD RISK-FREE
Fast, secure cloud hosting. 18 global data centers. Unhappy with your web host?
👉 Migrate for Free

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.