|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/emhunter/NewEmpireSite/ |
Upload File : |
<html>
<head>
<title>PHPMailer</title>
</head>
<body>
<?php
if (!array_key_exists('Submitted',$_POST))
{
?>
<form method="post" action="PHPMailer.php">
<input type="hidden" name="Submitted" value="true"/><br/>
<input type="hidden" name="To" value="[email protected]" size="25"/><br/>
Email:
<input type="text" name="From" size="25"/><br/>
Name:
<input type="text" name="FromName" size="25"/><br/>
Subject: <input type="text" name="Subject" size="25"/><br/>
Type <select name="type" size="1">
<option value=" Client Company Inquiry ">Client Company Inquiry </option>
<option value=" Individual Inquiry ">Individual Inquiry </option>
<!--<option value=" Technical Support ">Technical Support </option>
<option value=" Webmaster ">Webmaster </option>-->
</select><br>
<textarea name="Message" cols="50" rows="10"></textarea><br/>
Using HTML: <input type="checkbox" name="HTML"/>
<input type="submit" value="Send Email"/>
</form>
<?php
}
else
{
require("class.phpmailer.php");
$To = $_POST['To'];
$From = $_POST['From'];
$FromName = $_POST['FromName'];
$FromType = $_POST['type'];
$Subject = $_POST['Subject'];
$Message = $_POST['Message'];
$Host = $_POST['Host'];
if (array_key_exists('HTML',$_POST))
{
$HTML = true;
$Mail->Username=$_POST['Username'];
$Mail->Password=$_POST['Password'];
}
else
{
$HTML = false;
}
$Mail = new PHPMailer();
$Mail->IsSMTP(); // send via SMTP
$Mail->Host = $Host; //SMTP server
if (array_key_exists('Username',$_POST))
{
$Mail->SMTPAuth=true;
}
else
{
$Mail->SMTPAuth=false;
}
$Mail->From = $From;
$Mail->FromName = $FromName;
$Mail->AddAddress($To);
$Mail->AddReplyTo($From);
$Mail->WordWrap = 50; // set word wrap
$Mail->IsHTML($HTML);
$Mail->Subject = $Subject;
$Mail->Body = $Message;
if($Mail->Send())
{
echo "Message Sent";
}
else
{
echo "Message Not Sent<br/>";
echo "Mailer Error: " . $Mail->ErrorInfo;
}
}
?>
</body>
</html>