Niestety, podczas wysyłania wiadomości na inne skrzynki na gmailu są przekierowywane do SPAMu.
Czy jest to wina niepoprawnie sformułowanych znaczników, czy może po prostu GMail już tak ma?
Do wiadomości załączę oryginał wiadomości podany przez Gmail oraz kod wysyłający:
Cytat
Delivered-To: ***@gmail.com
Received: by 10.150.50.13 with SMTP id x13cs153428ybx;
Fri, 18 Jun 2010 11:25:09 -0700 (PDT)
Received: by 10.216.90.199 with SMTP id e49mr1124202wef.38.1276885509153;
Fri, 18 Jun 2010 11:25:09 -0700 (PDT)
Return-Path: <***@gmail.com>
Received: from mail-ww0-f67.google.com (mail-ww0-f67.google.com [74.125.82.67])
by mx.google.com with ESMTP id p40si10557711weq.69.2010.06.18.11.25.07;
Fri, 18 Jun 2010 11:25:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of ***@gmail.com designates 74.125.82.67 as permitted sender) client-ip=74.125.82.67;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of ***@gmail.com designates 74.125.82.67 as permitted sender) smtp.mail=***@gmail.com; dkim=pass (test mode) header.i=@gmail.com
Received: by mail-ww0-f67.google.com with SMTP id 31so43909wwb.2
for <***@gmail.com>; Fri, 18 Jun 2010 11:25:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:date:to:from:reply-to:subject
:message-id:x-priority:x-mailer:mime-version:content-type;
bh=PAKIaE7nNvszrXj3vApTw2wniz8j4lFowuFlDJ6ck58=;
b=ufU+VKNHA/lTt4vXtRCUkjcw4SuyyU+KQ+Ttw6E4uOCA7fqeMUTYkT3XPc+Knakf4P
TxDBLvFStcuuKcAxHkMg7WWYF/aYAEyLkY42y7NaMTPy2YvZiV9rxdl35WNnurcPu0QM
J1VF+H+AuEb+5AL0Jqpp7zWznRUPXxFooAiTQ=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=date:to:from:reply-to:subject:message-id:x-priority:x-mailer
:mime-version:content-type;
b=RjK7S3mN9yAaeyjSNfrw7j4bdeCywQJnFZsf+tcMmoOaGoP9/h8l25kvhU+RmdEl+b
8+EP5f8gVRV15fKqusb8TvpuOqgQ1B975feZXN+67tSh0O1c0+mOSufAczoPdPKp4JYb
Ew0yGWHnUS9Bd5GxqUuJ39tcr4/LBmUOz84HM=
Received: by 10.216.90.211 with SMTP id e61mr463973wef.91.1276885507592;
Fri, 18 Jun 2010 11:25:07 -0700 (PDT)
Return-Path: <***@gmail.com>
Received: from glibnes.webd.pl (w09.webd.pl [94.75.225.12])
by mx.google.com with ESMTPS id g17sm3370210wee.5.2010.06.18.11.25.06
(version=SSLv3 cipher=RC4-MD5);
Fri, 18 Jun 2010 11:25:06 -0700 (PDT)
Date: Fri, 18 Jun 2010 20:25:06 +0200
Return-Path: ***@gmail.com
To: ***@gmail.com
From: Glibnes <***@gmail.com>
Reply-to: Glibnes <***@gmail.com>
Subject: =?utf-8?Q?Przywracanie_has=C5=82a?=
Message-ID: <847c2ae9518e173893feea342eec705a@glibnes.webd.pl>
X-Priority: 3
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_847c2ae9518e173893feea342eec705a"
--b1_847c2ae9518e173893feea342eec705a
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit
Aby poprawnie wyświetlić tą wiadomość, proszę użyć programu
kompatybilnego z HTML!
--b1_847c2ae9518e173893feea342eec705a
Content-Type: text/html; charset = "utf-8"
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>Ten email został wygenerowany przez skrypt przywracania hasła na <a href="http://glibnes.webd.pl/game/">***</a><br /><br /><b>Aby nowe hasło zaczęło działać</b>, uaktywnij je poprzez ten link:<br/><a href="http://glibnes.webd.pl/game/lostpassword.php?code=***">http://glibnes.webd.pl/game/lostpassword.php?code=***</a><br/><br/><b>Twoje nowe hasło:</b> ****<br/><br/>Jeśli to nie ty generowałeś ten link, zignoruj tą wiadomość<br/>Życzymy powodzenia w grze!</body></html>
--b1_847c2ae9518e173893feea342eec705a--
Received: by 10.150.50.13 with SMTP id x13cs153428ybx;
Fri, 18 Jun 2010 11:25:09 -0700 (PDT)
Received: by 10.216.90.199 with SMTP id e49mr1124202wef.38.1276885509153;
Fri, 18 Jun 2010 11:25:09 -0700 (PDT)
Return-Path: <***@gmail.com>
Received: from mail-ww0-f67.google.com (mail-ww0-f67.google.com [74.125.82.67])
by mx.google.com with ESMTP id p40si10557711weq.69.2010.06.18.11.25.07;
Fri, 18 Jun 2010 11:25:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of ***@gmail.com designates 74.125.82.67 as permitted sender) client-ip=74.125.82.67;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of ***@gmail.com designates 74.125.82.67 as permitted sender) smtp.mail=***@gmail.com; dkim=pass (test mode) header.i=@gmail.com
Received: by mail-ww0-f67.google.com with SMTP id 31so43909wwb.2
for <***@gmail.com>; Fri, 18 Jun 2010 11:25:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:date:to:from:reply-to:subject
:message-id:x-priority:x-mailer:mime-version:content-type;
bh=PAKIaE7nNvszrXj3vApTw2wniz8j4lFowuFlDJ6ck58=;
b=ufU+VKNHA/lTt4vXtRCUkjcw4SuyyU+KQ+Ttw6E4uOCA7fqeMUTYkT3XPc+Knakf4P
TxDBLvFStcuuKcAxHkMg7WWYF/aYAEyLkY42y7NaMTPy2YvZiV9rxdl35WNnurcPu0QM
J1VF+H+AuEb+5AL0Jqpp7zWznRUPXxFooAiTQ=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=date:to:from:reply-to:subject:message-id:x-priority:x-mailer
:mime-version:content-type;
b=RjK7S3mN9yAaeyjSNfrw7j4bdeCywQJnFZsf+tcMmoOaGoP9/h8l25kvhU+RmdEl+b
8+EP5f8gVRV15fKqusb8TvpuOqgQ1B975feZXN+67tSh0O1c0+mOSufAczoPdPKp4JYb
Ew0yGWHnUS9Bd5GxqUuJ39tcr4/LBmUOz84HM=
Received: by 10.216.90.211 with SMTP id e61mr463973wef.91.1276885507592;
Fri, 18 Jun 2010 11:25:07 -0700 (PDT)
Return-Path: <***@gmail.com>
Received: from glibnes.webd.pl (w09.webd.pl [94.75.225.12])
by mx.google.com with ESMTPS id g17sm3370210wee.5.2010.06.18.11.25.06
(version=SSLv3 cipher=RC4-MD5);
Fri, 18 Jun 2010 11:25:06 -0700 (PDT)
Date: Fri, 18 Jun 2010 20:25:06 +0200
Return-Path: ***@gmail.com
To: ***@gmail.com
From: Glibnes <***@gmail.com>
Reply-to: Glibnes <***@gmail.com>
Subject: =?utf-8?Q?Przywracanie_has=C5=82a?=
Message-ID: <847c2ae9518e173893feea342eec705a@glibnes.webd.pl>
X-Priority: 3
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_847c2ae9518e173893feea342eec705a"
--b1_847c2ae9518e173893feea342eec705a
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit
Aby poprawnie wyświetlić tą wiadomość, proszę użyć programu
kompatybilnego z HTML!
--b1_847c2ae9518e173893feea342eec705a
Content-Type: text/html; charset = "utf-8"
Content-Transfer-Encoding: 8bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>Ten email został wygenerowany przez skrypt przywracania hasła na <a href="http://glibnes.webd.pl/game/">***</a><br /><br /><b>Aby nowe hasło zaczęło działać</b>, uaktywnij je poprzez ten link:<br/><a href="http://glibnes.webd.pl/game/lostpassword.php?code=***">http://glibnes.webd.pl/game/lostpassword.php?code=***</a><br/><br/><b>Twoje nowe hasło:</b> ****<br/><br/>Jeśli to nie ty generowałeś ten link, zignoruj tą wiadomość<br/>Życzymy powodzenia w grze!</body></html>
--b1_847c2ae9518e173893feea342eec705a--
Kod PHP:
function SendMail($to, $title, $body, $from = ''){ require_once 'includes/phpmailer/class.phpmailer.php'; try { if (!$from) { $from = '***'; } $mail = new PHPMailer(true); //New instance, with exceptions enabled $mail->IsSMTP(); // telling the class to use SMTP $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port for the GMAIL server $mail->Username = "USER"; // GMAIL username $mail->Password = "PASS"; // GMAIL password $mail->AddReplyTo($from,"Glibnes"); $mail->From = $from; $mail->FromName = "Glibnes"; $mail->AddAddress($to); $mail->Subject = $title; $mail->AltBody = "Aby poprawnie wyświetlić tą wiadomość, proszę użyć programu kompatybilnego z HTML!"; // optional, comment out and test $mail->WordWrap = 80; // set word wrap $mail->MsgHTML($body); $mail->IsHTML(true); // send as HTML $mail->Send(); return true; } catch (phpmailerException $e) { return $e->errorMessage(); } }