HEX
Server: Apache
System: Linux p3plzcpnl489526.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: vmasmheia229 (9244908)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/vmasmheia229/www/_html2012/contact/SMTPClass.php
<?php

class SMTPClient
{

function SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body)
{

$this->SmtpServer = $SmtpServer;
$this->SmtpUser = base64_encode ($SmtpUser);
$this->SmtpPass = base64_encode ($SmtpPass);
$this->from = $from;
$this->to = $to;

$this->subject = $subject;
$this->body = $body;

	if ($SmtpPort == "") 
	{
	$this->PortSMTP = 25;
		}else{
	$this->PortSMTP = $SmtpPort;
	}
}

function SendMail ()
{

	if ($SMTPIN = fsockopen ($this->SmtpServer, $this->PortSMTP)) 
	{
	
           fputs ($SMTPIN, "EHLO ".$HTTP_HOST."\r\n");  
           $talk["hello"] = fgets ( $SMTPIN, 1024 ); 
                   
		   fputs($SMTPIN, "auth login\r\n");
		   $talk["res"]=fgets($SMTPIN,1024);
			fputs($SMTPIN, $this->SmtpUser."\r\n");
		    $talk["user"]=fgets($SMTPIN,1024);
		    
		    fputs($SMTPIN, $this->SmtpPass."\r\n");
			$talk["pass"]=fgets($SMTPIN,256);
			   	    
           fputs ($SMTPIN, "MAIL FROM: <".$this->from.">\r\n");  
           $talk["From"] = fgets ( $SMTPIN, 1024 );  
           fputs ($SMTPIN, "RCPT TO: <".$this->to.">\r\n");  
           $talk["To"] = fgets ($SMTPIN, 1024); 
           
           fputs($SMTPIN, "DATA\r\n");
			$talk["data"]=fgets( $SMTPIN,1024 );
           
			fputs($SMTPIN, "To: <".$this->to.">\r\nFrom: <".$this->from.">\r\nSubject:".$this->subject."\r\n\r\n\r\n".$this->body."\r\n.\r\n");
			$talk["send"]=fgets($SMTPIN,256);
           
           //CLOSE CONNECTION AND EXIT ... 
		   
           fputs ($SMTPIN, "QUIT\r\n");  
           fclose($SMTPIN); 
		 //  
	}
	
return $talk;
}
}
?>