".$file['title']."
".$file['size']."
".conv_date($file['date'])."
"; } function sendMail($SM_email,$SM_email2,$SM_email_CC,$SM_subject,$SM_message,$SM_showalert,$SM_append){ $host=$GLOBALS['BASE_URL'].""; $send_date=conv_date(date("Y-m-d")); $top=<<
"; $bottom.="
Ordine dei Farmacisti di Salerno

$SM_subject $send_date
ttop; $bottom="

". "Questa e-mail contiene informazioni di proprietà e di natura confidenziale. Se non siete il destinatario corretto di questo messaggio, vi ricordiamo che ogni diffusione, distribuzione o copia di questo messaggio è severamente proibita. Se avete ricevuto questo messaggio per errore, siete pregati di cancellarlo immediatamente. Quanto precede ai fini del rispetto del D.L. n. 196/03 sulla tutela dei dati personali.
-
". "This e-mail (and any attachments) is strictly confidential and for use only by intendend recipients. If you are not an intended recipients, we point you that any diffusion, distribution or copy of this message is severely forbidden. If you have received t his message by mistake please destroy it immediately (under the observance of D.L. n. 196/03 which protects personal data).". "
Rispetta l'ambiente. Non stampare questa mail se non è necessaria."; $bottom.="
"; $headers = "From: \"Ordine dei Farmacisti di Salerno\" \n"; $headers .= "MIME-Version: 1.0\n"; $msg=""; if($SM_append){ $append_name = basename($SM_append); $append_type = mime_content_type($SM_append); $data = chunk_split(base64_encode(file_get_contents($SM_append))); $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; $headers .= "Content-Type: multipart/mixed;\n"; $headers .= " boundary=\"{$mime_boundary}\"\n"; $headers .= "X-Mailer: PHP " . phpversion(); $msg .= "This is a multi-part message in MIME format.\n\n"; $msg .= "--{$mime_boundary}\n"; $msg .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; $msg .= "Content-Transfer-Encoding: 7bit\n\n"; $msg .= $top.$SM_message.$bottom."\n\n"; $msg .= "--{$mime_boundary}\n"; $msg .= "Content-Type: {$append_type}; name=\"{$append_name}\"\n"; $msg .= "Content-Transfer-Encoding: base64\n"; $msg .= "Content-Disposition: attachment; filename=\"{$append_name}\"\n\n"; $msg .= $data."\n\n"; $msg .= "--{$mime_boundary}--\n"; }else{ $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; $msg = $top.$SM_message.$bottom."\n\n"; } if(@mail(trim($SM_email),$SM_subject,$msg, $headers)){ if(@$SM_email2){ if($SM_email_CC){ $headers = "Bcc: $SM_email_CC \n".$headers; } @mail(trim($SM_email2),$SM_subject,$msg, $headers)or die("errore invio mail"); } if($SM_showalert){ echo "

E-mail inviata correttamente


"; } }else{ if($SM_showalert){ echo "


ERRORE:


". "Si è verificato un errore nell'invio della mail.
". "Si prega contattare l'amministratore del sistema.
"; } } $of=fopen("../mailoutput.html","w"); fwrite($of, "Email:".$SM_email."\n
Email:".$SM_email2."\n
Email CC:".$SM_email_CC."\n
Subject:".$SM_subject."\n

CONTENT:\n".$msg); fclose($of); } ?>