嗨,我试图通过 phpmailer 发送电子邮件。我用 phpmailer 通过 smtp 发送它。每个客户都有我们自己的IP。我发送了一封测试电子邮件,我看到电子邮件标题中有两个“已收到”条目。可以只显示一个吗?因为我认为如果我们的一位客户发送垃圾邮件,我们的主服务器就会出现问题。
剧本:
require('lib/phpmailer/class.phpmailer.php');
require('lib/phpmailer/class.smtp.php'); // stellt die Methoden für SMTP-Connect bereit
$mail = new PHPMailer();
// Anmelden am SMTP-Server
$mail->IsSMTP();
$mail->Host = $smtphostname;
$mail->SMTPAuth = true;
$mail->Username = $smtpbenutzername;
$mail->Password = $smtppasswort;
$mail->Port = $smtpport;
$mail->Subject = 'SMTP - Test';
$mail->IsHTML(true);
$mail->Body = 'Dies ist eine SMTP - Testmail. Es ist keine Aktion erforderlich, sondern bestätigt lediglich die Einrichtung eines neuen SMTP - Kontos im Mailsystem.';
$mail->From = $absendeadresse;
$mail->FromName = 'SMTP - Testmailer';
$mail->AddReplyTo($antwortadresse);
$mail->Sender = $bounceadresse;
$mail->CharSet = "utf-8";
$Xuserid = 500;
$mail->Xuserid = $Xuserid;
$mail->AddAddress($adminemail);
邮件标题:
Return-Path: bounce@customerdomain.com
Received: from dc.ourdomain.com ([IP.IP.IP.IP]) by mx-ha.web.de (mxweb008)
with ESMTP (Nemesis) id 0M0Ptt-1ULMIH1Vcb-00uXxW for <xxx@gmail.com>; Sun, 19 May 2013 20:50:56 +0200
Received: from [IP.IP.IP.IP] (port=42845 helo=ourdomain.com) by dc.ourdomain.com with esmtpa (Exim 4.80)
(envelope-from <bounce@customerdomain.com>) id 1Ue8h7-00089Y-6b for xxx@gmail.com; Sun, 19 May 2013 20:50:57 +0200
Date: Sun, 19 May 2013 20:50:57 +0200
To: xxx@gmail.com
From: SMTP - Testmailer <info@customerdomain.com>
Reply-To: info@customerdomain.com
Subject: SMTP - Test
Message-ID: <933166e45238090b8be63d3e2891dd6b@ourdomain.com>
我不想展示这个……这可能吗?
Received: from dc.ourdomain.com ([IP.IP.IP.IP]) by mx-ha.web.de (mxweb008)
with ESMTP (Nemesis) id 0M0Ptt-1ULMIH1Vcb-00uXxW for <xxx@gmail.com>; Sun, 19 May 2013 20:50:56 +0200