Cytat
Catchable fatal error: Object of class PHPMailer could not be converted to string in /home/oomaster/domains/trose35.pdg.pl/public_html/388644/customer_1.php on line 65
require('phpmailer/class.phpmailer.php');
$mail = new PHPMailer();
$mail->PluginDir = "phpmailer/";
$mail->CharSet = "UTF-8";
$mail->From = "xx@xx.pl";
$mail->FromName = "xxxx";
$mail->Host = "mail.x.pl";
$mail->Mailer = "smtp";
$mail->Username = "ix@x.pl";
$mail->Password = "xyz";
$mail->SMTPAuth = true;
$mail->Port = 25;
$mail->SetLanguage("pl", "phpmailer/language/");
$mail->Subject = "teściką";
$mail->Body = 'ok';
$mail->AddAddress("x@x.pl","Andrzej pro");
if($mail->Send())
{
echo '<div class="alert_ok">E-mail został wysłany</div>'; }
else
{
echo 'E-mail nie mógł zostać wysłany, przyczyna :'. $mail->ErrorInfo; }
$mail->ClearAddresses();
$mail->ClearAttachments();
A błąd dotyczy linii:
$mail->Body = 'ok';
Maile się wysyłają ale co jest grane ?