We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Jak zmieniŠ kod?


molek
01-03-2006, 15:24
Witam!

Chcialabym prosic o pomoc, gdyz zainstalowalam php mailer ale nie umiem skonfigurowac ustawien, zeby mail poprawnie dzialal.
Wpisalam jak nalezy adresy serwera smtp a takze adres mailowy i haslo, ale wstawiajac caly kod do pliku w skrypcie mojej strony nie chce dzialac.

Plik "Mail Out" mojego skryptu wyglada nastepujaco:

class MailOut
{
var $to, $to_name, $from_email, $message, $demo, $from_name,$headers,$to_name;

function MailOut ($to,$from_email,$from_name,$subject,$message,$dem o,$to_name)
{
$this->to=$to;
$this->from_email=$from_email;
$this->message=$message;
$this->demo=$demo;
$this->subject=$subject;
$this->from_name=$from_name;
}

function setIni($command,$value)
{
ini_set($command, $value);
}


function sendMail ()
{
$this->headers .= "From: $this->from_name <" . $this->from_email . ">\n";
$this->headers .= "Reply-To: <".$this->from_email.">\n";
$this->headers .= "X-Sender: <$this->from_email>\n";
$this->headers .= "X-Mailer: PHP4\n"; //mailer
$this->headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$this->headers .= "Return-Path: <$this->from_email>\n";

if (!$this->demo)
{
if (mail($this->to,stripslashes($this->subject),wordwrap(stripslashes($this->message)),$this->headers))
{
return true;
}
}
return false;
}

function debug()
{
echo "

DEBUG:
";
echo "HEADER:" . $this->headers . "
";
echo "FROM:" . $this->from_email . "
";
echo "FROM_NAME: " . $this->from_name . "
";
echo "SUBJECT: " . $this->subject . "
";
echo "MESSAGE: " . $this->message . "
";
echo "

";
}

}

?>



W ktore miejsce musze wkleic ten kod z php mailer?
Probowalam zastepowac calosc w/w skyptu na skrypt z php mailera ale wyskakuja bledy

z gory dziekuje za pomoc...