Jump to content

Email script


ronnie88

Recommended Posts

Script redirects fine but I do not get the email any help?

 

<?php
header( 'Location: XXXX' ) ;

/////////// Getting the form values/////////
$username = $_POST['username'];
$email_address = $_POST['email'];
$ip_address = $_POST['ip_address'];
$iptype = $_POST['iptype'];
$userlocation = $_POST['userlocation'];
$extrainformation = $_POST['extrainformation'];

/////////// Checking for Email Injection/////////
if ( ereg( "[\r\n]", $username ) || ereg( "[\r\n]", $email_address ) ) {
header('Location: XXXX' );
}

/////////// Making the Email Message/////////
$email_from = $username;
$email_subject = "Password Reset Request";
$email_body = "You have received a new message. Here are the details: Name = " . $username . ", Postal Address = " . $email_address . ", IP Address = " . $ip_address . ",IP Type = " . $iptype . ", User Location = " . $userlocation . ", Extra Information = " . $extrainformation; 

/////////// Sending the Email using the mail() function/////////
$to = "it@supclan.com";
$headers = "From: $email_from";
mail($to,$email_subject,$email_body,$headers);
echo "Your message was sent successfully";
?> 

Link to comment
Share on other sites

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.