Jump to content

Recommended Posts

 

 

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

 

 

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.