Nome *
E-mail *
Morada *
Código Postal *
Fax
Telefone
Telemóvel
Interessado/a em:
 
Piscinas e produtos quimicos... Spas, saunas, etc
Tratamento e reaproveitamento de águas Energias renováveis e climatizaçáo
Deseja: Como deseja ser contactado/a:
Formalizar o Pedido: *
 
Upload de Arquivo: *
 
  O arquivo deverá ter no máximo 3Mb.
   
 
 
"text/html", "htm"=>"text/html", "txt"=>"text/plain", "rtf"=>"text/enriched", "csv"=>"text/tab-separated-values", "css"=>"text/css", "gif"=>"image/gif", "doc"=>"application/msword", "jpeg"=>"image/jpeg", "jpg"=>"image/jpeg", "jpe"=>"image/jpeg", "exe"=>"application/octet-stream", "mid"=>"audio/midi", "midi"=>"audio/midi", "mov"=>"video/quicktime", "movie"=>"video/x-sgi-movie", "mp3"=>"audio/mpeg", "mpeg"=>"video/mpeg", "mpg"=>"video/mpeg", "mpga"=>"video/mpeg", "png"=>"image/png", "pps"=>"application/mspowerpoint", "ppt"=>"application/mspowerpoint", "ppz"=>"application/mspowerpoint", "qt"=>"video/quicktime", "ra"=>"audio/x-realaudio", "rgb"=>"image/x-rgb", "tif"=>"image/tiff", "tiff"=>"image/tiff", "wav"=>"audio/x-wav", "swf"=>"application/x-shockwave-flash", "zip"=>"application/zip", ); $ABORT = FALSE; $boundary = "XYZ-" . date(dmyhms) . "-ZYX"; $message = "--$boundary\n"; $message .= "Content-Transfer-Encoding: 8bits\n"; $message .= "Content-Type: text/html; charset=\"ISO-8859-1\"\n\n"; $message .= "Enviado em ". date("d/m/Y"). "

Mensagem com os seguintesdados:

Nome: " .$_POST['nome']. "
Email: " .$_POST['de']. "
Morada: " .$_POST['morada']. "
Código Postal: " .$_POST['codigo']. "
Fax: " .$_POST['fax']."
Telefone: " .$_POST['telefone']."
Telemóvel: " .$_POST['telemovel']."
Interessado/a em: " .$_POST['interesse']."
Deseja: " .$_POST['deseja']."
Como deseja ser contactado/a: " .$_POST['contacto']."
Mensagem:
" .nl2br($_POST['msg']). "

"; $message .= "\n"; $attachments[1] = $anexo; foreach ($attachments as $key => $full_path) { if ($full_path !='') { if (file_exists($full_path)){ if ($fp = fopen($full_path,"rb")) { if ((filesize($full_path)/1024) > "3000"){ echo "O arquivo que você tentou anexar, possui mais que 3MB. Por favor, tente um arquivo menor."; exit; } $filename = array_pop(explode(chr(92),$full_path)); $contents = fread($fp,filesize($full_path)); $encoded = base64_encode($contents); $encoded_split = chunk_split($encoded); fclose($fp); $message .= "--$boundary\n"; $message .= "Content-Type: $anexo_type\n"; $message .= "Content-Disposition: attachment; filename=\"$anexo_name\" \n"; $message .= "Content-Transfer-Encoding: base64\n\n"; $message .= "$encoded_split\n"; } else { echo "Impossível abrir o arquivo$key: $filename"; $ABORT = TRUE; } } else { echo "O arquivo$key não existe: $filename"; $ABORT = TRUE; } } } $message .= "--$boundary--\r\n"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: <".$_POST['de'].">\r\n"; $headers .= "Content-type: multipart/mixed; boundary=\"$boundary\" charset=iso-8859-1\r\n"; $mensagem = mail($_POST['email'], $assunto, $message, $headers); if ($mensagem) { print "Mensagem enviada com sucesso!"; } else { print "O envio da mensagem falhou!"; } } ?>