简体   繁体   English

电子邮件未发送(通过phpMailer lite发送)

[英]EMAILS not delivered (sent via phpMailer lite)

I am sending both html and text mime parts trough gmail smtp...(my domain is registered and setup for gmail) 我正在通过gmail smtp发送html和文本mime部分...(我的域名已注册并设置了gmail)

the mails are coming to gmail (in SPAM folder) and not coming to some other mail inboxes (hotmail for one)... 邮件进入gmail(位于SPAM文件夹中),而不到达其他一些邮件收件箱(其中一个是hotmail)...

$mail = new PHPMailerLite();
$mail->CharSet = "utf-8";

$mail->SMTPAuth = false;
$mail->IsHTML(true);

$mail->SetFrom($this->CONF["appemail"], $this->CONF["appemail_from"]);


$mail->Host = "smtp.mydomain.com";
$mail->SMTPSecure = "ssl";
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = "info@mydomain.com";
$mail->Password = "*****"; 

$mail->AddAddress($to);
$mail->Subject = $subject;

$mail->MsgHTML($body);
$mail->Send();

I tried qMail, SMTPAuth true, etc... nothing works! 我尝试了qMail,SMTPAuth true,等等。

It is not mass mailing, just simple registration confirmation emails... 这不是群发邮件,只是简单的注册确认电子邮件...

I tried mail chimp, sending trough API... and the same mail gets delivered (to hotmail too)... but Mail Chimp is not ment for sending single mails and it's a bit slow and impractical (since you have to create campaigns on the fly).... 我尝试了邮件黑猩猩,通过低谷API发送...,并且同样的邮件也被发送到了(也发送到hotmail)...但是邮件黑猩猩不是发送单个邮件的方式,并且它有点慢且不切实际(因为您必须在飞)。

Any other ideas? 还有其他想法吗?

EDIT ===================================== I tried using just php mail function with same results... gmail comes to spam, hotmail doesnt come at all 编辑====================================我尝试仅使用具有相同结果的php邮件功能。 。gmail成为垃圾邮件,hotmail根本不存在

here is the (LATEST) original test msg (only html)... 这是(最新)原始测试消息(仅HTML)...

Delivered-To: xy@gmail.com
Received: by 10.220.150.212 with SMTP id z20cs54012vcv;
        Mon, 31 Oct 2011 12:55:34 -0700 (PDT)
Received: by 10.236.155.104 with SMTP id i68mr19074448yhk.61.1320090932659;
        Mon, 31 Oct 2011 12:55:32 -0700 (PDT)
Return-Path: <apache@localhost.localdomain>
Received: from localhost.localdomain ([91.185.208.219])
        by mx.google.com with ESMTPS id k64si13327245yhm.46.2011.10.31.12.55.31
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 31 Oct 2011 12:55:32 -0700 (PDT)
Received-SPF: neutral (google.com: 91.185.208.219 is neither permitted nor denied by best guess record for domain of apache@localhost.localdomain) client-ip=91.185.208.219;
Authentication-Results: mx.google.com; spf=neutral (google.com: 91.185.208.219 is neither permitted nor denied by best guess record for domain of apache@localhost.localdomain) smtp.mail=apache@localhost.localdomain
Received: from localhost.localdomain (MYDOMAIN [127.0.0.1])
    by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p9VJtU07022212
    for <xy@gmail.com>; Mon, 31 Oct 2011 20:55:31 +0100
Received: (from apache@localhost)
    by localhost.localdomain (8.13.8/8.13.8/Submit) id p9VJtULP022211;
    Mon, 31 Oct 2011 20:55:30 +0100
Date: Mon, 31 Oct 2011 20:55:30 +0100
Message-Id: <201110311955.p9VJtULP022211@localhost.localdomain>
To: xy@gmail.com
Subject: MYDOMAIN.com - Registracija
From: webmaster@example.com
Reply-To: webmaster@example.com
X-Mailer: PHP/5.3.8MIME-Version: 1.0
Content-type: text/html; charset=utf-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>subject</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body style="font-size:12px; font-family: arial, verdana, sans-serif;">
        <table style="border:3px solid #8E89A3;">
            <tr style="border:3px solid #fff; background-color: #fff;">
                <td style="width: 150px; background-color: #524E63; vertical-align: bottom;"><img src="http://MYDOMAIN.com/media/mail_bg.png" /></td>
                <td style="width:auto; padding:15px 20px;">
                    <h4 style="color:#000 !important; font-size:16px !important; font-weight: bold !important;">ÄŒestitke</h4>
<p>Le Å¡e korak vas loÄi, da postanete MYDOMAIN.</p>


<p style="margin-top:20px;">Vaša registracijska koda je<br>
<b>{code}</b>
</p>


<p style="margin-top:30px;">Kliknite na spodnjo povezavo<br>
<a href="{url}">{url}</a>
</p>

                    <p style="margin-top:50px;">Prijazen pozdrav<br /><b>Ekipa MYDOMAINja</b></p>

                    <p class="footer" style="font-size:10px !important; color:#999; margin-top:30px;">
                        Podjetje: <b>MYDOMAIN d.o.o. Napredni spletni oglasnik</b> - ggggggg: <br />
                        Web: <a href="http://MYDOMAIN.com" style="color:#666 !important;">http://MYDOMAIN.com</a> - E-mail: <a href="mailto:info@MYDOMAIN.com" style="color:#666 !important;">info@MYDOMAIN.com</a> -   Tel: <b>05xxxx</b>
                    </p>
                </td>
            </tr>
        </table>
    </body>
</html>

EDIT2: --------------- ADDING MSG FROM phpmailer lite..... the one that DO comes in gmail INBOX and does not come to hotmail EDIT2:---------------从phpmailer lite添加MSG .....一个来自gmail INBOX而不是hotmail的邮件

Delivered-To: x.y@gmail.com
Received: by 10.220.150.212 with SMTP id z20cs54409vcv;
        Mon, 31 Oct 2011 13:07:23 -0700 (PDT)
Received: by 10.236.22.33 with SMTP id s21mr19191499yhs.70.1320091642527;
        Mon, 31 Oct 2011 13:07:22 -0700 (PDT)
Return-Path: <info@MYDOMAIN.com>
Received: from localhost.localdomain ([91.185.208.219])
        by mx.google.com with ESMTPS id d30si18816984yhl.99.2011.10.31.13.07.20
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 31 Oct 2011 13:07:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of info@MYDOMAIN.com designates 91.185.208.219 as permitted sender) client-ip=91.185.208.219;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of info@MYDOMAIN.com designates 91.185.208.219 as permitted sender) smtp.mail=info@MYDOMAIN.com
Received: from localhost.localdomain (MYDOMAIN [127.0.0.1])
    by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p9VK7JH0022228
    for <x.y@gmail.com>; Mon, 31 Oct 2011 21:07:20 +0100
Received: (from apache@localhost)
    by localhost.localdomain (8.13.8/8.13.8/Submit) id p9VK7I72022227;
    Mon, 31 Oct 2011 21:07:18 +0100
X-Authentication-Warning: localhost.localdomain: apache set sender to info@MYDOMAIN.com using -f
To: x.y@gmail.com
Date: Mon, 31 Oct 2011 21:07:18 +0100
From: =?utf-8?Q?Me=C5=A1etar?= <info@MYDOMAIN.com>
Reply-to: =?utf-8?Q?Me=C5=A1etar?= <info@MYDOMAIN.com>
Subject: =?utf-8?Q?Me=C5=A1etar_-_Registracija?=
Message-ID: <9aa1a988936cf53868568b275c29e728@MYDOMAIN.com>
X-Priority: 3
X-Mailer: PHPMailer Lite 5.1 (phpmailer.codeworxtech.com)
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_9aa1a988936cf53868568b275c29e728"


--b1_9aa1a988936cf53868568b275c29e728
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

ÄŒestitke
Le Å¡e korak vas loÄi, da postanete MYDOMAIN.


Vaša registracijska koda je
{code}



Kliknite na spodnjo povezavo
{url}


                    Prijazen pozdravEkipa MYDOMAINja


                        Podjetje: MYDOMAIN d.o.o. Napredni spletni oglasnik - xxxx, 1000 - Ljubljana: 
                        Web: http://MYDOMAIN.com - E-mail: info@MYDOMAIN.com -  Tel: xxxx


--b1_9aa1a988936cf53868568b275c29e728
Content-Type: text/html; charset = "utf-8"
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>*|MC:SUBJECT|*</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body style="font-size:12px; font-family: arial, verdana, sans-serif;">
        <table style="border:3px solid #8E89A3;">
            <tr style="border:3px solid #fff; background-color: #fff;">
                <td style="width: 150px; background-color: #524E63; vertical-align: bottom;"><img src="http://MYDOMAIN.com/media/mail_bg.png" /></td>
                <td style="width:auto; padding:15px 20px;">
                    <h4 style="color:#000 !important; font-size:16px !important; font-weight: bold !important;">ÄŒestitke</h4>
<p>Le Å¡e korak vas loÄi, da postanete MYDOMAIN.</p>


<p style="margin-top:20px;">Vaša registracijska koda je<br>
<b>{code}</b>
</p>


<p style="margin-top:30px;">Kliknite na spodnjo povezavo<br>
<a href="{url}">{url}</a>
</p>

                    <p style="margin-top:50px;">Prijazen pozdrav<br /><b>Ekipa MYDOMAINja</b></p>

                    <p class="footer" style="font-size:10px !important; color:#999; margin-top:30px;">
                        Podjetje: <b>MYDOMAIN d.o.o. Napredni spletni oglasnik</b> - xxxx, 1000 - Ljubljana: <br />
                        Web: <a href="http://MYDOMAIN.com" style="color:#666 !important;">http://MYDOMAIN.com</a> - E-mail: <a href="mailto:info@MYDOMAIN.com" style="color:#666 !important;">info@MYDOMAIN.com</a> -   Tel: <b>xxxx</b>
                    </p>
                </td>
            </tr>
        </table>
    </body>
</html>



--b1_9aa1a988936cf53868568b275c29e728--

EDIT 3 ============================================== 编辑3 ==============================================

NVM, I am stupid as hell... phpmailer LITE does not include smtp capabilities :( NVM,我很愚蠢……phpmailer LITE不包含smtp功能:(

Use PHPmailer and not PHPMailer LITE 使用PHPmailer而不是PHPMailer LITE

PHPMailer LITE does not have SMTP capabilities built in! PHPMailer LITE没有内置的SMTP功能!

as per the new SMTP rule has implemented on all mail servers ie you need to setup the from email address same as which define / register & Valid at that mail server. 按照新的SMTP规则已在所有邮件服务器上实施,即,您需要将发件人电子邮件地址设置为与该邮件服务器上的定义/注册和有效地址相同。 you can't spam with any other email address or domain name : 您不能使用任何其他电子邮件地址或域名来发送垃圾邮件:

eg if you have email account at google as abc@gmail.com and you setup all SMTP setting and all. 例如,如果您在Google的电子邮件帐户为abc@gmail.com,并且设置了所有SMTP设置和全部。 in few months ago we can override the from address from SMTP API zyx@gmail.com and the SMTP API will work. 在几个月前,我们可以覆盖SMTP API zyx@gmail.com中的发件人地址,并且SMTP API可以使用。

but now you can't do that. 但是现在你不能那样做。

It sounds like the mailserver on your host may be blocked by spam filters. 听起来主机上的邮件服务器可能已被垃圾邮件过滤器阻止。
If it's shared hosting or virtual shared hosting, it's not uncommon for one of the other customers to have abused mail sending in the past and got the entire server blocked. 如果是共享主机或虚拟共享主机,其他客户之一过去滥用邮件发送并阻塞整个服务器的情况并不少见。 Happened to me with one of my hosts. 和我的一位主持人发生在我身上。

From: webmaster@example.com
This is your problem. 这是你的问题。 because this domain is not really exists - GMail guessing it's spam and put it in that folder, other services just not so kind as GMail.. 因为该域实际上并不存在-GMail猜测它是垃圾邮件,并将其放在该文件夹中,其他服务却不如GMail好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM