cloevvold Posted November 7, 2007 Share Posted November 7, 2007 I have a problem with a script that sends out email, and works perfectly from one server, but does not work and dont send the mai from another server. I hope that someone can tell me whats wrong?? This is phpinfo from the server that everything is working: http://www.cloevvold-photo.com/phpinfo.php and this is phpinfo from the server that dont send the email: http://www.noramas.no/phpinfo.php And here is the script that only works from the one server: <?php error_reporting(0); ?> <!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=utf-8" /> <meta http-equiv="content-type" content="text/html;charset=ISO 8859-1" /> <meta name="generator" content="Adobe GoLive" /> <title>Noram Produkter A/S - Ventilasjon P Naturens Vilkr</title> <link rel="stylesheet" href="../../css/lightbox.css" type="text/css" media="screen" /> <script src="../../js/prototype.js" type="text/javascript"></script> <script src="../../js/scriptaculous.js?load=effects" type="text/javascript"></script> <script src="../../js/lightbox.js" type="text/javascript"></script> <style type="text/css"> #lightbox, #overlay { z-index:10000 !important; } </style> <link href="../../css/style.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <!-- ImageReady Slices (1_home.psd - Slices: 01, 03) --> <table width="759" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="759" height="566" ALT="" valign="top" bgcolor="#FFFFFF"> <table width="759" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="white" width="271" height="566" valign="top" alt="" style="background-position:bottom; background-repeat:no-repeat " background="../../bilder/hoved_design/buisness.jpg"><img src="../../bilder/hoved_design/logo.jpg" alt="" height="69" width="271" usemap="#logo16be78b" border="0" /><map name="logo16be78b"><area shape="rect" coords="27,14,243,58" href="../../index.html" alt="" /></map></td> <td width="488" height="566" alt="" valign="top" style="background-position:top right; background-repeat:no-repeat " background="../../bilder/hoved_design/girl.jpg"> <table width="488" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="5"> <menumachine name="mainmenu" id="m17wmfia"> <csobj t="Component" csref="../../menumachine/mainmenu/menuspecs.menudata"><noscript> <p><a class="mm_no_js_link" href="../../menumachine/mainmenu/navigation.html">Site Navigation</a></p> </noscript> </csobj> <script type="text/javascript"><!-- var mmfolder=/*URL*/"../../menumachine/",zidx=1000; //--></script> <script type="text/javascript" src="../../menumachine/menumachine2.js"></script> <script type="text/javascript" src="../../menumachine/mainmenu/menuspecs.js"></script> </menumachine> </td> </tr> </table> <div style="margin-left:31px; margin-top:24px; width:340px "> <br /> <br /> <img src="../../bilder/hoved_design/ventilasjon.jpg" alt="" width="232" height="20" border="0" /><br /> <br /> </div> <div style="margin-top:20px "> <table width="486" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td background="../../bilder/hoved_design/red_td.jpg" width="486" height="33" ALT="" valign="top"> <div style="margin-top:1px "> <table width="486" height="32" border="0" cellspacing="0" cellpadding="0"> <tr> <td style="background-position:right; background-repeat:repeat-y " colspan="2" valign="top" width="486"> <div style="margin-left:29px; margin-top:12px "> <span class="bot_men"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Bestilling</font></b></span></div> </td> </tr> </table> </div> </td> </tr> <tr> <td width="486" height="312" ALT="" valign="top"> <table width="486" height="407" border="0" cellspacing="0" cellpadding="0" background="../../bilder/hoved_design/px1.jpg" style="background-position:right; background-repeat:repeat-y "> <tr> <td class="box_bestill" height="407" valign="top" background="../../bilder/hoved_design/px1.jpg" style="background-position:left; background-repeat:repeat-y "> <div style="margin-top:5px "> <div class="box_bestill"> <br /> <br /> <style type="text/css" media="screen"><!-- .readonly { color: #16287c; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } --></style> <?php $produkt = $_POST['produkt']; $name = $_POST['name']; $address = $_POST['address']; $state = $_POST['state']; $city = $_POST['city']; $zip = $_POST['zip']; $country = $_POST['country']; $phone = $_POST['phone']; $email = $_POST['email']; $comments = $_POST['comments']; $fax = $_POST['fax']; $sender_name= decodeuft8($sender_name); $sender_name= utf8_encode($sender_name); $error_msg = ""; $msg = ""; function decodeuft8($str){ $matches = array("¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","","®","¯","°","±","²","³","´","µ","?","¶","•","¸","¹","º","»","¼","½","¾","¿","À","?","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","?","Î","?","?","Ñ","Ò","Ó","","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","?","Þ","ß","" ,"À","á","?","â","Â","ã","Ã","ä","Ä","å","Å","æ","Æ","ç","Ç","è","È","é","É","ê","Ê","ë","Ë","ì","Ì","í","?","î","Î","ï","?","ð","?","ñ","Ñ","ò","Ò","ó","Ó","ô","","õ","Õ","ö","Ö","÷","ø","Ø","ù","Ù","ú","Ú","û","Û","ü","Ü","ý","?","þ","Þ","ÿ","?","Œ","œ","Š","š","Ÿ","Ž","ž","ƒ","ˆ","˜"); $replaces = array("","","","","","","","","","","","","","","","","","","","","","?","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","?","","","","","","","","","",""); return str_replace($matches, $replaces, $str); } if(!$name){ $error_msg .= "Ditt navn \n"; } if($name){ $msg .= "Navn: \t $name \n"; } if(!$address){ $error_msg .= "Din adresse \n"; } if($address){ $msg .= "Adresse: \t $address \n"; } if($city){ $msg .= "Sted: \t $city \n"; } if(!$city){ $error_msg .= "Sted \n"; } if(!$zip){ $error_msg .= "Ditt postnummer \n"; } if($zip){ $msg .= "Postnr: \t $zip \n"; } if(!$phone){ $error_msg .= "Ditt telefonnummer \n"; } if($phone){ $msg .= "Telefon: \t $phone \n"; } if(!$email){ $error_msg .= "Din E-mail \n"; } if($email){ if(!eregi("^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\._\-]+\.[a-zA-Z]{2,4}", $email)){ echo "\n<br>E-mail adressen du taset inn er ikke gyldig. Vennligst <a href=\"javascript:history.back()\"><font color=#16287c><u>g</u></font></a> tilbake til forrige side prv igjen.\n<br>"; exit; } $msg .= "E-mail: \t $email \n"; } $sender_email=""; if(!isset($name)){ if($name == ""){ $sender_name="Web Customer"; } }else{ $sender_name=$name; } if(!isset($email)){ if($email == ""){ $sender_email="Customer@website.com"; } }else{ $sender_email=$email; } if($error_msg != ""){ echo "Du har ikke fyllt ut alle feltene:<br>" .nl2br($error_msg) .'<br>Vennligst <a href="javascript:history.back()"><font color=#16287c><u>g</u></font></a> til forrige side prv igjen.'; exit; } $mailheaders = "MIME-Version: 1.0\r\n"; $mailheaders .= "Content-type: text/plain; charset=utf-8\r\n"; $mailheaders .= 'From: '.$sender_name.'<'.$sender_email.'> "\r\n"' . 'Reply-To: '.$sender_email.'<'.$sender_email.'> "\r\n"' . $from="post@noramas.no"; $subject="Bestilling av Filter til Exvent Pingvin"; mail($from,$subject,stripslashes($msg), utf8_encode($mailheaders)); echo "<html>\n<head>\n<title>Noram Produkter AS</title>\n</head>\n<body><font size=2 color=#16287c face=Verdana, Arial, Helvetica, sans-serif><b>Takk for din bestilling!</b></font><br>\n";echo '<font size=1 color=#373737 face=Verdana, Arial, Helvetica, sans-serif><b>Dette er infomasjonen du sendte:</b></font>'."<br><br>\n"; echo nl2br(stripslashes($msg)); echo '<html><br><body><font size=1 color=#373737 face=Verdana, Arial, Helvetica, sans-serif>Med Vennlig Hilsen<br>Noram Produkter AS</font></body></html>'; //This is the end of the PHP code ?> </div> </div> </td> </tr> </table> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> <tr height="61"> <td width="757" height="61" ALT="" valign="top" background="../../bilder/hoved_design/bottom.jpg"> <table width="757" height="47" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="copy" width="360" valign="top"> <div style="margin-top:4px; margin-right:90px " align="center"> <div class="copy"> <font color="white">Copyright 2005-2007 Noram Produkter A/S<br /> Design og utvikling av nettside - <a href="http://www.cloevvold-photo.com/" target="_blank">Cecilie Lvvold</a></font></div> </div> </td> <td align="center" width="397"> <div align="center" style="margin-top:26px " class="bot_men"> <div class="bottom_links"> <div class="bot_men"> </div> </div> </div> </td> </tr> </table> </td> </tr> </table> <!-- End ImageReady Slices --><br /> <br /> </body> </html> Pleace can someone see whats need to be fixed to make this work..?? Quote Link to comment https://forums.phpfreaks.com/topic/76386-problem-with-phpini-configurations/ 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.