I have an order form that used to work OK on a old server but we had to change servers last year.
Up until a couple of months ago everything was OK on the new server. We then started getting messages from people saying where was their payment request; strangely this was just Australia and New zealand.
The unsent orders started getting more frequent and now there are no orders being recived from the server. I copied myself into the emails to make sure it was not just a problem with the site owners computer.
This evening I copied the code over to my website and ran it without a problem sending orders to myself. I then copied in the site owner and he recived the emails from my site but when I tried his site again neither of us recived an order.
I am assuming it might just be a server setup. I am using ereg and I can see that ereg is depreciated ( I added error_reporting(E_ALL); to my code ) would that prevent the form being sent but allow the code to run?
It is strange that when I add error reporting to the original website there are no errors reported !
At one point we did have problems with the email on the old server and I had to add a -f flag and the email address was added to a file on the server. The new hosts had not heard of this and do not seem interested in implementing it.
The additional_parameters parameter can be used to pass additional flags as command line options to the program configured to be used when sending mail, as defined by the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.
Has anyone else had a similar problem? I can post the code but it is about 280 lines and I thought I would see if anyone else had had a similar problem.
The code is quite old now and it may be better just to rewrite it particularly as I need to sort out the ereg()
I have just put a simple php contact form on the site and that is sent OK so I am going to rewrite the code and see what happens.
This is taking a lot of effort to sort out. I decided to rewrite the form anyway as it was quite old but it still did not work.
The host also have no idea why it has stopped working but it works on my website which is on a different server. I downloaded a simple php email form and tried that - it worked but why one and not the other?
Coping the headers from one to the other and the order form works. It looks like adding 'X-Mailer: PHP/' . phpversion(); to the header has fixed the problem; but I need to get everything back to how it should be to be sure.
I now need to find out why it made the form work and should I be using that or something similar!
This topic is now closed. New replies are no longer allowed.