New Feature Announcement: Master Your Email Delivery with the Mail Delivery Center

Why am I not able to send mail via my PHP script or application?

If you're having trouble sending emails from your PHP script or application, it could be due to the way your application is configured to send emails. By default, many PHP applications use a protocol called PHPMail(), which can lead to several issues, including emails being marked as spam. This guide will help you understand why this happens and how to resolve it.

Understanding PHPMail()

PHPMail() is a function used by PHP to send emails directly from a server. However, it has a number of disadvantages and is often the reason why emails end up in the recipient's spam folder.

When an email is sent from a PHP application using PHPMail(), it uses an email address similar to [email protected]. However, your application's configuration might be set to send emails from a different, more user-friendly email address, such as [email protected].

This discrepancy can be recognized as 'spoofing' by many recipient mailboxes, which may flag the message as spam. Due to these issues, PHPMail() is disabled on our servers by default.

Using SMTP Instead of PHPMail()

We recommend using SMTP (Simple Mail Transfer Protocol) to relay all messages from your PHP script or application. SMTP is a protocol for sending emails reliably and efficiently.

SMTP uses proper authentication, which increases the chances of your emails being successfully delivered to the recipient's inbox. It also allows you to send emails from a user-friendly email address without being flagged as spam.

How to Configure Your Application to Use SMTP

The process of configuring your application to use SMTP instead of PHPMail() will depend on the specific application you're using. Many applications have settings or plugins that allow you to easily switch to SMTP. You'll typically need to provide the SMTP server name, port, and authentication details.

By understanding the cause of your email sending issues and switching to SMTP, you can improve your email deliverability and reduce the likelihood of your messages being incorrectly marked as spam.

  • 406 Users Found This Useful
Was this answer helpful?

Related Articles

 Getting Started

Overview MailGee supports a variety of email clients, both on desktop computers and on...

 Android

Open the Email app. If this is your first email account, tap Add Account; if not, tap More and...

 Apple macOS / iOS

Method 1 via Mobileconfig¶ Email, contacts and calendars can be configured automatically on...

 eM Client

Launch eM Client. If this is the first time you launched eM Client, it asks you to set up your...

 KDE Kontact

Launch Kontact. If this is the first time you launched Kontact or KMail, it asks you to set up...

Powered by WHMCompleteSolution