Host blocking PHP mail notifications
Posted: Thu Mar 10, 2011 10:56 pm
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.
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.