BitsIntellimedia Posted April 20, 2009 Share Posted April 20, 2009 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); ?> Quote Link to comment https://forums.phpfreaks.com/topic/154907-mail-form/ Share on other sites More sharing options...
jackpf Posted April 20, 2009 Share Posted April 20, 2009 Your header should authenticate it to be sent from your server. But if smtp is disabled, there's no way of using it. Quote Link to comment https://forums.phpfreaks.com/topic/154907-mail-form/#findComment-814788 Share on other sites More sharing options...
BitsIntellimedia Posted April 20, 2009 Author Share Posted April 20, 2009 R u sure there's no way... ?! Quote Link to comment https://forums.phpfreaks.com/topic/154907-mail-form/#findComment-815033 Share on other sites More sharing options...
mr_chuya Posted April 21, 2009 Share Posted April 21, 2009 what is your script respond if you run the program? Quote Link to comment https://forums.phpfreaks.com/topic/154907-mail-form/#findComment-815268 Share on other sites More sharing options...
BitsIntellimedia Posted April 21, 2009 Author Share Posted April 21, 2009 it usually sends the form variables and info the my email address... but since this host disables SMTP / anonymous mail is blocked. So, no response and no email sent. Quote Link to comment https://forums.phpfreaks.com/topic/154907-mail-form/#findComment-815285 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.