Script URL:
Version of script: 1.7
Hosting company: fasthosts.co.uk
URL of phpinfo.php: http://www.flutterbydaisy.co.uk/guestbook/phpinfo.php
URL of session_test.php: http://www.flutterbydaisy.co.uk/guestbo ... n_test.php
What terms did you try when SEARCHING for a solution:
Write your message below:
Hi guys,
I am extremely new to php, and the guestbook code and instructions you have built have been incredibly helpful for me. I have got everything to function as required, learning as I go along but I am yet to get the email notifications to function.
I didn't know why until I discovered that the host company I am using have some procedures in place with php and mail scripts. They require that I use an email address that is registered to the URL name. So I set up a ******************* email address. This wasn't enough to get the code to work though, and after doing some reading I have found that I need to incorporate the following code:
<?php
ini_set("sendmail_from", "user@yourdomain.com");
mail($email_to, $email_subject, $email_message, $headers, "-fuser@yourdomain.com");
?>
I am very google hungry, and infact most of the entire website im building has been done by me finding and adapting code. However I am not sure how to add the above into your existing guestbook code.
If someone could just point me in the right direction I would be incredibly grateful.
Host blocking PHP mail notifications
Re: Host blocking PHP mail notifications
Open gbook.php in notepad and find all lines that start with
Each of these lines ends with
Add this before the "ends with" code: (that is -f plus user@yourdomain.com)
Then open settings.php in Notepad and just below add
Code: Select all
mail(
Code: Select all
);
Code: Select all
, "-fuser@yourdomain.com"
Then open settings.php in Notepad and just below
Code: Select all
ini_set('log_errors', 1);
Code: Select all
ini_set("sendmail_from", "user@yourdomain.com");
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools