0

So I have been using cPanel to administer my sites for quite a while, but have recently moved my sites onto a VPS running Plesk 11.5.30.

I have contact forms on these sites that use the PHP mail() function, but since the move they don't get delivered with no errors. All the contact forms are sent to an external email address which resides on a different server. Also the from address is set to be the email address of the person that filled out the form.

Here is a simple example of what I am trying to do:

mail( "email@anotherdomain.com","Test Email","Test Message","From: <customer@domain.com>");

So basically I want to use the PHP mail() function to send emails to an external domain and set them to come from the submitter's email address. This had been working fine on the cPanel server, but Plesk doesn't seem to like it.

Some of the sites do use the server for mail and some use external services.

I have searched for a while and cannot find a similar situation, so any help would be greatly appreciated!

Thanks

--- EDIT ---

I have read the duplicate question and I have followed all of those steps. I would like to hear from someone who has been the the same situation (moved to a Plesk and their mail() function stops working), or knows what my issue is.

Stuart Taylor-Jones
  • 210
  • 1
  • 4
  • 13

1 Answers1

-1

Check the function first:

    if ( function_exists( 'mail' ) )
{
    echo 'mail() is available';
}
else
{
    echo 'mail() has been disabled';
} 

It's likely to be your apache or smtp settings have changed OR mail in php is disabled

gabs
  • 87
  • 8
  • Thanks for the response. Yes, mail is enabled. Would you know roughly what settings would not allow php mail() to send emails to/from external addresses? – Stuart Taylor-Jones Aug 05 '14 at 10:59