or better im so new to that, that i dont know what to do.…
I followed this Tutorial: http://code.google.com/a/apache-extras.org/p/phpmailer/wiki/UsefulTutorial
first i downloaded the package of phpMailer, unzipped id and put those Files
to the Top-Level of my Server (even i cant see a htdocs Folder or something, it has MySQL, PHP and whatever on it)
then i write a File called test.php with this on it:
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "send.one.com"; // SMTP server
$mail->From = "hello@blub.com";
$mail->AddAddress("hello@blub.com");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>
<?PHP
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SetLanguage('de');
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "send.one.com"; // SMTP server
$mail->Port = 587;
$mail->SMTPAuth = TRUE;
$mail->Username = "info@blubblub.de";
$mail->Password = "****************";
$mail->From = "hello@blub.com";
$mail->FromName = "hello@blub.com";
$mail->AddAddress("hello@blub.com");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
}
?>
Go to my Browser and enter the Adress where the File is lays.
And get the Message "Parse error: syntax error, unexpected T_PUBLIC, expecting ',' or ';' in /customers/1/f/7/blub.de/httpd.www/class.smtp.php on line 69"
(ok after i read somewhere i should set the debugging in the File on)
So now i sit here and don´t know what to do, because i have no clou how PHP works and just want a Contactformular in my HTML Site ;o(
Could you Guys help me out please?
Best wishes
Andreas