We help IT Professionals succeed at work.
Get Started

PHP mail() function not working

1,254 Views
Last Modified: 2013-12-02
We just switched over to a new dedicated server with GoDaddy. FTPed all my files over from the GoDaddy Shared Hosting acct to the new Dedicated Server. The email forms that use the mail() function do not work on this server. It is a fresh/new configuration, and unlike the shared hosting acct, this server was NOT setup and ready to go. In the PLESK interface, I fond that this LINUX server uses (QMAIL) for SMTP and the service is running. However my test forms are not arriving, even though on submit, they do take you to the Thank You page with NO ERRORS. Is there some kind of switch I need to turn on, or some setting I need to tweak???

Below is the code of the test email form:

Here are the logs from /var/log/messages:
Nov  5 14:13:49 hostname xinetd[13652]: START: smtp pid=23712 from=xx.xx.xx.xx (<------ Our IP addr)
Nov  5 14:13:49 hostname xinetd[13652]: EXIT: smtp status=0 pid=23712 duration=0(sec)
<?php mail("user@domain.com", "test message from godaddy", "this is a test message, if you are reading this the email was sent successfully."); ?>

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE