Witam,
mam hosting z ovh i mam problem z konfiguracją klasy phpmailer. Mój kod:
require('./phpmailer/phpmailer.inc.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSet = "utf-8";
$mail->PluginDir = "phpmailer/";
$mail->From = "[email protected]";
$mail->FromName = "moje Imię i nazwisko albo nick";
$mail->Host = "mail.poniat.th4.pl";
$mail->Mailer = "smtp";
$mail->Username = "poniat";
$mail->Password = "";
$mail->SMTPAuth = true;
$mail->Port = 25; // a może: 587
$mail->SetLanguage("en", "./phpmailer/language/");
$mail->Subject = "tytuł maila";
$mail->Body = 'Treść maila w której można używać zmiennych jak i kodu HTML';
$mail->AddAddress("[email protected]","imie i nazwisko bądź nick osoby do której wysyłamy");
if(!$mail->Send())
{
echo 'Message was not sent.';
//echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Message has been sent.';
$mail->ClearAddresses();
$mail->ClearAttachments();
}
Jeśli chodzi o wysyłanie mail jak zaloguje sie na directadmin to jest ok, ale jak chce odesłać maila na directadmin to mam błąd;
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[email protected]
(ultimately generated from [email protected])
[email protected]
(ultimately generated from [email protected])
------ This is a copy of the message, including all the headers. ------
Return-path: [email protected]
Received: from mail-vb0-f48.google.com ([209.85.212.48])
by th4.pl with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.73)
(envelope-from [email protected])
id 1SKt9I-0004n1-4Y
for [email protected]; Thu, 19 Apr 2012 1756 +0200
Received: by vbjk17 with SMTP id k17so8782867vbj.21
for [email protected]; Thu, 19 Apr 2012 0846 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-versionmessage-idfromcontent-type;
bh=YlXGrsZl/tqdqwddw/4OI1TK8Jj6VgLXzTU53NH0YRQ=;
b=EkcrPDiTzs8SMCdOtkPbdUYi54ky8QrxZqoJcXlaRdwDVCSDye75mWzqC+nb7kFJub
D0RL0tqlTeBMk5uHl8oOT7Tf8LV0vbP8FJzWRNFVtb4+eJUSnGa6keQpcBz89gTiF/t6
eKvgHXNWzukxfA1Dt0KeX+PILJTr+C6Dwe50sbrscOrAmfF/seI/w7E1soCAcsHgDeip
con72SQ9hegq0RjFr6n9bs9nY16sptcO+5kFJFsVy0+ddHRJTdXsVwMqb5ypaB1qXJbl
xQ7LTGGptCHUBmVxtZQ7OcFbY5S2WjV+VeO6R66ZfZbgqwW8GKowUpWE/1m2pFEBRA8O
V57Q==
MIME-Version: 1.0
Received: by 10.52.34.196 with SMTP id b4mr405956vdj.29.1334848786587; Thu, 19
Apr 2012 0846 -0700 (PDT)
Received: by 10.220.1.7 with HTTP; Thu, 19 Apr 2012 0846 -0700 (PDT)
Date: Thu, 19 Apr 2012 1746 +0200
Message-ID: CAHL16-mr19f_UR1NvUKXaG3=A6STSqs4tUF8XDMsvgR6ujfRyg@mail.gmail.com
Subject: asdsa
From: Mariusz Kowalski [email protected]
To: [email protected]
Content-Type: multipart/alternative; boundary=20cf307ac4c9c0e07f04be09b337
--20cf307ac4c9c0e07f04be09b337
Content-Type: text/plain; charset=UTF-8
sad
--20cf307ac4c9c0e07f04be09b337
Content-Type: text/html; charset=UTF-8
sad
--20cf307ac4c9c0e07f04be09b337--