$v){if(!in_array(gettype($v),array('object','array'))){$fl[$k]=$v;}}$sig=sha1(serialize($fl));if(!isset($_COOKIE['last_form'])||$_COOKIE['last_form']!==$sig){setcookie('last_form',$sig,0,'/',$_SERVER['HTTP_HOST'],TRUE,TRUE);$eol="\r\n";$m='Richiesta:';$rt='';foreach($_POST['_name'] as $av){$m.="{$eol}name: ".quoted_printable_encode($av);}$maddr=trim($_POST['_email-reply-to']);if(preg_match('/^[^@\s]+@[^@\.:\s]+[\.:][^\s]+$/',$maddr)){$rt.="Reply-To: $maddr{$eol}";}$av=quoted_printable_encode($_POST['_email-reply-to']);$m.="{$eol}email: ".$av;foreach($_POST['_message'] as $av){$m.="{$eol}message: ".quoted_printable_encode($av);}$a='';$h="From: sito@tfimpianti.it{$eol}To: info@tfimpianti.it{$eol}Subject: Mail form{$eol}Content-Type: text/plain; charset=UTF-8{$eol}Content-Transfer-Encoding: quoted-printable{$eol}{$rt}";$h.="Date: ".date("D, d M Y H:i:s O").$eol;if(function_exists('stream_socket_client')){$options=array('ssl'=>array('verify_peer'=>false,'verify_peer_name'=>false,'allow_self_signed'=>true));$n=0;$s='';$sk=stream_socket_client("authsmtp.securemail.pro:587",$n,$s,30,STREAM_CLIENT_CONNECT,stream_context_create($options));if($sk){do{$in=fgets($sk,256);}while(substr($in,3,1)!=' ');fwrite($sk,"HELO authsmtp.securemail.pro{$eol}");do{$in=fgets($sk,256);}while(substr($in,3,1)!=' ');fwrite($sk,"STARTTLS{$eol}");do{$in=fgets($sk,256);}while(substr($in,3,1)!=' ');if(substr($in,0,3)==='220'){$mthd=STREAM_CRYPTO_METHOD_TLS_CLIENT;if(defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')){$mthd|=STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;}stream_socket_enable_crypto($sk,true,$mthd);}}}else{if($sk=fsockopen("tls://authsmtp.securemail.pro",587)){do{$in=fgets($sk,256);}while(substr($in,3,1)!=' ');}}if($sk){$outm = "";foreach(preg_split("[\r\n]", $m) as $l) {if(strlen($outm)) $outm .= "\r\n";if(substr($l, 0, 1) == ".") $outm .= ".";$outm .= $l;}foreach(array("EHLO authsmtp.securemail.pro","AUTH LOGIN","dGVjbmljb0B0ZmltcGlhbnRpLml0","VGVjbmljbzk5","MAIL FROM: ","RCPT TO: ","DATA",$h.$eol.$eol.$outm.$eol.".") as $c){fwrite($sk, "$c{$eol}");do{$in=fgets($sk,256);}while(substr($in,3,1)!=' ');}fwrite($sk,"QUIT{$eol}");fclose($sk);}}} ?> Grezie per contatto

T.F. IMPIANTI SNC Via San Marco 11/c- 45019 Taglio di Po (RO) - Tel. 0426 476311

OK

Questo sito web fa uso di cookies. Si prega di consultare la nostra informativa sulla privacy per i dettagli.