<?php
require_once('email-txt.class.php');
if($_POST['form_sended']=="1") {
$ObjEmailTxt = new EmailTxt();
try {
$ObjEmailTxt->LoadFile($_FILES);
}catch(Exception $e){
echo "<span class=error>";
echo $e->getMessage();
echo "</span><br>";
}
$ObjEmailTxt->SetSender($_POST["sender"]);
if(!empty($_POST["reply_to"])) {
$ObjEmailTxt->SetReplyTo($_POST["reply_to"]);
}else{
$ObjEmailTxt->SetReplyTo($_POST["sender"]);
}
$ObjEmailTxt->SetSubject($_POST["temat"]);
$ObjEmailTxt->SetMsg($_POST["tresc"]);
try {
$ObjEmailTxt->Send();
}catch(Exception $e) {
echo "<span class=error>";
echo $e->getMessage();
echo "</span><br>";
}
echo "znaleziono ".$ObjEmailTxt->ReturnCounter()." adresow email.";
echo "<br><br>";
}
Bookmarks