Lisa23 Posted May 19, 2010 Share Posted May 19, 2010 Postby jonathan on Wed May 19, 2010 3:02 am hi i was using xampp to create my website but now i changed to a real web host is called dream-hosting.co.uk/ now i my emails sent tru my contact form no longer work bellow is my code using xampp localhost.. mail("xxxx@hotmail.co.uk", 'Name: '.$name, 'Telephone: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from"); how do i change to still send the emails to my hotmail account but the difference is that the server is no longer xampp local host but dream hosting?? i tried to change the email address to the one i created form the webhost site like xxx@name_of_my_site.co.uk but still didnt work Link to comment https://forums.phpfreaks.com/topic/202324-how-do-change-email-from-my-local-host-to-my-webserver/ Share on other sites More sharing options...
Lisa23 Posted May 20, 2010 Author Share Posted May 20, 2010 Quote Postby jonathan on Wed May 19, 2010 3:02 am hi i was using xampp to create my website but now i changed to a real web host is called dream-hosting.co.uk/ now i my emails sent tru my contact form no longer work bellow is my code using xampp localhost.. <?php // ----------------------------------------- // The Web Help .com // ----------------------------------------- // remember to replace you@email.com with your own email address lower in this code. // load the variables form address bar $subject = $_POST["subject"]; $message = $_POST["message"]; $name = $_POST["name"]; $from = $_POST["from"]; $verif_box = $_POST["verif_box"]; // remove the backslashes that normally appears when entering " or ' $message = stripslashes($message); $subject = stripslashes($subject); $name = stripslashes($name); $from = stripslashes($from); // check to see if verificaton code was correct if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){ // if verification code was correct send the message and show this page mail("xxxxx@hotmail.co.uk", 'Name: '.$name, 'Telephone: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from"); // delete the cookie so it cannot sent again by refreshing this page setcookie('tntcon',''); } else if(isset($message) and $message!=""){ // if verification code was incorrect then return to contact page and show error header("Location: contact.php?subject=$subject&name=$name&from=$from&message=$message&wrong_code=true"); exit; } else { echo "no variables received, this page cannot be accessed directly"; exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>E-Mail Sent</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } --> </style></head> <body> Thank you. Your message has been sent.<br /><br /> You should receive a reply within 24 hours <br /><br /> Return to <a href="index.html">home page</a> ? </body> </html> how do i change to still send the emails to my hotmail account but the difference is that the server is no longer xampp local host but dream hosting?? i tried to change the email address to the one i created form the webhost site like xxx@name_of_my_site.co.uk but still didnt work Link to comment https://forums.phpfreaks.com/topic/202324-how-do-change-email-from-my-local-host-to-my-webserver/#findComment-1061391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.