Archive for the ‘php’ Category

php with fasthosts.

10 Mar, 08

So i was doing a php email form the other day for ilikehammocks.

I was sure i wrote the code right but it wouldn’t work. For the life of me i couldn’t figure out why.

Enter google.

I went wandering round google until i was lost in the realms of uber geeks. It turns out that fasthosts (my domain provider) forgot about the email function in php, and to get around it i had to add this to the first line of my code:

ini_set("sendmail_from", " email@somedomain.com");

score!

For some reason fasthosts like to dismiss the simple things, so if you’re having a problem with getting emails to actually go anywhere, like i was, this seems to be the way to fix it. All the rest of my code could then stay the same but it then knew what it was doing in terms of carrying out the send function.

I dont think any more explanation is necessary, but get in touch if you need more help.