Jump to content

Recommended Posts

I created a reservation form with flash, on which the variables on the form are posted onto a PHP file that e-mails the information to my email. Though, the hosting disabled the SMTP thus disallowing anonymous emails to be sent from the server. is there any code/script that bypass this to email the content of the form ?

 

<?php

// Ip address

$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);

 

// In case register globals is off

$name = $HTTP_POST_VARS['Name'];

$fname = $HTTP_POST_VARS['Fname'];

$company = $HTTP_POST_VARS['Company'];

$mobilen = $HTTP_POST_VARS['Mobilen'];

$phonen = $HTTP_POST_VARS['Phonen'];

$email = $HTTP_POST_VARS['Email'];

$date = $HTTP_POST_VARS['daten'];

$time = $HTTP_POST_VARS['timen'];

$pickup = $HTTP_POST_VARS['pickupn'];

$dropad = $HTTP_POST_VARS['dropn'];

$flighttrain = $HTTP_POST_VARS['flighttn'];

$passenger = $HTTP_POST_VARS['passn'];

$luggage = $HTTP_POST_VARS['lugn'];

$child = $HTTP_POST_VARS['chiln'];

$comm = $HTTP_POST_VARS['comn'];

 

// Begin Censors

$comm = eregi_replace('fuck', "flip", $comm);

$comm = eregi_replace('shit', "crap", $comm);

$comm = eregi_replace('bitch', "nice lady", $comm);

$comm = eregi_replace('ass', "butt", $comm);

$comm = eregi_replace('piss', "pee", $comm);

// End Censors

 

// Remove Slashes Inserted by PHP

$name = stripslashes($name);

$fname = stripslashes($fname);

$company = stripslashes($company);

$mobilen = stripslashes($mobilen);

$phonen = stripslashes($phonen);

$email = stripslashes($email);

$date = stripslashes($date);

$time = stripslashes($time);

$pickup = stripslashes($pickup);

$dropad = stripslashes($dropad);

$flighttrain = stripslashes($flighttrain);

$passenger = stripslashes($passenger);

$luggage = stripslashes($luggage);

$child = stripslashes($child);

$comm = stripslashes($comm);

 

// Start Customizable Email Information

// Change the information in quotes below to fit your needs

 

$rec_email = "mail@mail.com"; // who do you want to send this email to

$subject = "Reservation"; // this is the subject line of the email

 

// End Customizable Email Information

 

// Add Some Extra Header Information to the Mail

$header_info = "From: ".$name." ".$fname." <".$email.">";

 

// The Body of the Email message

// You can customize the email you receive by changing the text inside the quotes below

// IMPORTANT NOTE: DO NOT change anything that has a $ before it

 

$msg_body .= "Name:  $name\n";

$msg_body .= "Last Name:  $fname\n";

$msg_body .= "Company Name:  $company\n";

$msg_body .= "Mobile Number:  $mobilen\n";

$msg_body .= "Phone Number:  $phonen\n";

$msg_body .= "E-Mail:  $email\n";

$msg_body .= "Date Of Pickup:  $date\n";

$msg_body .= "Time Of Pickup:  $time\n";

$msg_body .= "Pickup Address:  $pickup\n";

$msg_body .= "Drop Address:  $dropad\n";

$msg_body .= "Flight/Train Info:  $flighttrain\n";

$msg_body .= "Passengers #:  $passenger\n";

$msg_body .= "Luggages #:  $luggage\n";

$msg_body .= "Children:  $child\n";

$msg_body .= "Comments/Details:  $comm\n\n";

$msg_body .= "The Sender's IP Address was recorded as: $ip\n Email Form provided by Anthony El Haybé";

 

// mail it to the recipient

mail($rec_email, $subject, $msg_body, $header_info);

 

?>

 

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.