php attach server problem

php attach server problem

offline
  • Pridružio: 18 Dec 2007
  • Poruke: 95

imam problem skripta sa attach-om koja mi je radila do skoro tj. dok provider nije updetovao neke stvari. Sad odjednom nece jer je najverovatnije problem tj. sigurno problem u delu za attach. evo skripte:
$to = $_REQUEST['sendto'] ; $from = $_REQUEST['Email'] ; $ime = $_REQUEST['ime'] ; $headers = "From: $from"; $subject = "Obrazac"; $fields = array(); $fields{"ime"} = "ime"; $fields{"APR"} = "APR"; $fields{"PIB"} = "PIB"; $fields{"naziv"} = "naziv"; $fields{"mesto"} = "mesto"; $fields{"adresa"} = "adresa"; $fields{"postf"} = "postf"; $fields{"delatnost"} = "delatnost"; $fields{"tel1"} = "tel1"; $fields{"tel2"} = "tel2"; $fields{"tel3"} = "tel3"; $fields{"Email"} = "Email"; $fields{"sajt"} = "sajt"; $fields{"Message"} = "Message"; $body = "Primili smo sledeće podatke:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } $headers2 = "From: administrator@marketserbia.net"; $subject2 = "Obrazac je uspešno poslat"; $autoreply = "Vaš zahtev je na obradi!"; //Gather file data and other things $tmp = $_FILES['logo']['tmp_name']; $sep = md5(time()); $filename = $_FILES['logo']['name']; $filedata = file_get_contents($tmp); //Get file contents $fdata = chunk_split(base64_encode($filedata)); //Encode data into text form $to = "administrator@marketserbia.net"; //Email address to send this to //Determine mime type $ext = explode('.', $filename); $ext = $ext[1]; if($ext == "JPG" || $ext == "jpg" || $ext == "JPEG" || $ext == "jpeg") { $mime_type = "image/jpg"; } elseif($ext == "gif" || $ext == "GIF") { $mime_type = "image/gif"; } elseif($ext == "" || $ext == "") { $mime_type = "image/"; } else { exit("Error: Wrong file type!"); } //Begin the message.  Be sure to change this how you want it. $message = "Email message here"; //Begin the headers $headers = "From:{$from} MIME-Version: 1.0 Content-Type: Multipart/Mixed;   boundary=\"$sep\" charset=\"iso-UTF-8\" Content-Transfer-Encoding: 7bit --$sep Content-Type: $mime_type;   name=\"$filename\" Content-Transfer-Encoding: base64 Content-Disposition: attachment;     filename=\"$filename\" $fdata --$sep"; if($from == '') {print "Niste uneli vaš email, molimo pokušajte ponovo";} else { if($ime == '') {print "Niste uneli vaše ime, molimo pokušajte ponovo";} else{ $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if($send) {print "Obrazac je uspešno poslat!";} else {print "Problem u slanju e-mail-a, obavestite nas na administrator@marketserbia.net"; } } }



Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
Ko je trenutno na forumu
 

Ukupno su 898 korisnika na forumu :: 60 registrovanih, 5 sakrivenih i 833 gosta   ::   [ Administrator ] [ Supermoderator ] [ Moderator ] :: Detaljnije

Najviše korisnika na forumu ikad bilo je 3466 - dana 01 Jun 2021 17:07

Korisnici koji su trenutno na forumu:
Korisnici trenutno na forumu: A.R.Chafee.Jr., aboris, aleksmajstor, amonsrb, Apok, arzak, Atomski čoban, bojankrstc, BORUTUS, Bubimir, ccoogg123, cinoeye, dankisha, darkangel, DeerHunter, Drug pukovnik, Dukelander, dule10savic, eighty-one, Fog of War, gomago, goran.vvv, Herman Terrance Aubrey, Istman, jumba, kokodakalo, konstruktor, krlebgd77, kybonacci, maiden6657, mercedesamg, mile23, misaru, Mixelotti, mnn2, nebkv, nextyamb, opt1, ostoja, Outis, Panter, Petarvu, Pomorac1, repac, Ripanjac, savaskytec, saxone, Singidunumac, sombrero, Sr.Stat., Toni, trikomso, ucenik32, Van, Velizar, vladulns, wexy, wizzardone, Zi0mek, Šraf