August 16, 200818 yr Hi guys. Really desperate for some help here....anyone knowledgable in PHP? Further to my last post about the php contact form issues I was having (http://www.webdesignerforum.co.uk/index.php?showtopic=9959) I have tested the mail scripting function and it is working with the really basic code below:- <?php $res = mail("samdelara@btinternet.com", "Test PHP Mailer Script for samdelara.co.uk", "Hi, This message demonstrates PHP mailer scripts working on the domain samdelara.co.uk, Kind regards, Streamline.Net ", "From: root@samdelara.co.uk", "-froot@samdelara.co.uk"); if($res == 1){echo "Email sent successfully. Check samdelara@btinternet.com to make sure it was received."; } ?><p></p>Script created at: 16/08/2008 11:15:48<br />Current time/date: <? echo date("d\/m\/Y h:i:s"); ?> I have tried to alter this to include some of the code present on the other script but the moment I change anything the form stops working....can anyone help or point me in the direction of a good resource? I can't understand why this test mailer script is working but the other script will not work at all, even though it has been proven to work elsewhere wiuth exactly the same code!! HELP!! Sam
August 16, 200818 yr I am with streamline.net first go in to you domain control panel and to your email settings set it up to redirect to your email address so that you will have something like myname@mydomain.co.uk redirected to your email address you wish to recive emails to then i have found with streamline you dont use the mail function i have attached the code i have to use of one of my contact forms with streamline.net <?php $name=$_POST['name']; $email=$_POST['email']; $tel=$_POST['tel']; $callback=$_POST['phoneback']; $message=$_POST['message']; if (!isset($_REQUEST['email'])) { header( "Location: index.php" ); } else if (empty($email) || empty($message)|| empty($name) ) { header( "Location: contact_error.php" ); } else { $message2=("you have recived a message from $name Email {$email} Tel {$tel} Phone back at {$callback} Message {$message}"); ini_set("sendmail_from", "mydomain.co.uk"); $message2, "From: $email" ); header( "Location: thank_you.php" ); } ?>
August 16, 200818 yr Author I am with streamline.net first go in to you domain control panel and to your email settings set it up to redirect to your email address so that you will have something like myname@mydomain.co.uk redirected to your email address you wish to recive emails to then i have found with streamline you dont use the mail function i have attached the code i have to use of one of my contact forms with streamline.net <?php $name=$_POST['name']; $email=$_POST['email']; $tel=$_POST['tel']; $callback=$_POST['phoneback']; $message=$_POST['message']; if (!isset($_REQUEST['email'])) { header( "Location: index.php" ); } else if (empty($email) || empty($message)|| empty($name) ) { header( "Location: contact_error.php" ); } else { $message2=("you have recived a message from $name Email {$email} Tel {$tel} Phone back at {$callback} Message {$message}"); ini_set("sendmail_from", "mydomain.co.uk"); $message2, "From: $email" ); header( "Location: thank_you.php" ); } ?> Hi ELITE. Thank you for your prompt reply. I have gone in to my email settings but cannot find an option to redirect anything to my email address....could you tell me specifically where to find it? Do you know why I was unable to set up the previous script? I've concluded that it must be streamline.net preventing the email from being sent.... Sam
August 16, 200818 yr Author Hi ELITE. Thank you for your prompt reply. I have gone in to my email settings but cannot find an option to redirect anything to my email address....could you tell me specifically where to find it? Do you know why I was unable to set up the previous script? I've concluded that it must be streamline.net preventing the email from being sent.... Sam Right, I think I know what the issue is....I have a 'home user' package and I bet this is what is stopping me from setting up this contact form due to restrictions on being able to set up mailboxes and forwarded email address etc.... What streamline.net package do you have? Sam
August 16, 200818 yr (1) hi first click on go by your domain name in the control pannel (2) click on email overview under emailsettings at the bottom of the page (3) where it says add new mailbox at the bottom of the page change this from standerd to forwarder and type the name you wish the beggginnig of the email adress to be yourname then your domain name is in a box by the side (4) click add new mailbox (5) type your email address you wish to recive emails to in the forward to mailbox any problems pm me as i am not here all the time hope you sort it
August 16, 200818 yr Author (1) hi first click on go by your domain name in the control pannel(2) click on email overview under emailsettings at the bottom of the page (3) where it says add new mailbox at the bottom of the page change this from standerd to forwarder and type the name you wish the beggginnig of the email adress to be yourname then your domain name is in a box by the side (4) click add new mailbox (5) type your email address you wish to recive emails to in the forward to mailbox any problems pm me as i am not here all the time hope you sort it Hi, I've attached a screen shot of my page. Doesn't seem as if this option is available.... Is this because I am on the 'home' user package? I previously had a .asp script (on a windows server) that was working fine to my email address and this was through streamline net and I didn't have to change these settings....
August 16, 200818 yr are you still on there 90 day free trial as i have the option for mailbox set up on your screen shot
August 16, 200818 yr Author are you still on there 90 day free trial as i have the option for mailbox set up on your screen shot No, I'm not on a free trial, it's the 'home user' package.... "(3) where it says add new mailbox at the bottom of the page change this from standerd to forwarder and type the name you wish the beggginnig of the email adress to be yourname then your domain name is in a box by the side" I can't see the option you mention!!
August 16, 200818 yr No, I'm not on a free trial, it's the 'home user' package.... "(3) where it says add new mailbox at the bottom of the page change this from standerd to forwarder and type the name you wish the beggginnig of the email adress to be yourname then your domain name is in a box by the side" I can't see the option you mention!! oh i am on unlimited users just checked there deal for home user is there any cahnce you can remove one of the forwarder emails set up and replace it with your new one,i would say submit a ticket to them thet respond quickly but takes about 6 attempts to get the answer of them
August 16, 200818 yr Hi Sam, Two things you need to check. 1) smtp gateway is set 2) safe_mode is set to off You can check this by creating a file in notepad called test.php and upload it to your web site root directory. Within this file put the following commands : <?php phpinfo(); ?> Then call test.php in your broswer. You should see a whole load of config settings for php. These are the settings and functions that your hosting provider allows you to do through php. Just do a search for smtp and safe_mode (Safe_mode is set to off and smtp has a gateway assigned to it). If these settings do not conform to what I stated then your hosting has disallowed it. But your hosting can block emails as a security measure because of spamming, in which case you need to tell them that you would like this service. Some times they may black list you because some one else has used your email address for spamming. Hope this helps and Good luck
Create an account or sign in to comment