Oke ich hab es nun bearbeitet es sieht jetzt so aus:
Funktion
Vorlage
Die Emails werden aber immer noch als Spam deklariert.
Funktion
PHP:
function eMail($empfanger, $betreff, $text){
global $supportEmail, $projekt;
$betreff = htmlspecialchars($betreff, ENT_QUOTES);
$text = htmlspecialchars($text, ENT_QUOTES);
// Mail Header
$header = "From: ".$projekt."<".$supportEmail.">\r\n";
$header .= "Reply-To: <".$empfanger.">\r\n";
$header .= "Return-Path: ".$supportEmail."\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=UTF-8\r\n";
$header .= "Content-Transfer-Encoding: 8bit\r\n";
$header .= "Message-ID: <".time()." ".$supportEmail.">\r\n";
$header .= "X-Mailer: PHP v".phpversion()."\r\n\r\n";
// Vorlage laden und für den Versand vorbereiten
$mailText = file_get_contents( 'inc/vor.email.html' );
// Platzhalter mit den Benutzereingaben ersetzen
$mailText = str_replace( '###BETREFF###', $betreff , $mailText );
$mailText = str_replace( '###NACHRICHT###', nl2br($text), $mailText );
// Email versenden
if(@mail( $empfanger, $betreff, $mailText, $header, "-f ".$supportEmail)){
return TRUE;
}else{
return FALSE;
}
}
Vorlage
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>###BETREFF###</title>
<style type='text/css'>
*{margin: 0px; padding: 0px; list-style-type: none;}
h3{ padding: 15px 0px 20px 0px; }
#hader{ padding-bottom: 12px;background-image: url(http://www.blacki.in/image/streifen1.png); background-repeat: repeat-x; background-position: bottom; }
#footer{ padding: 15px 0px 20px 0px; }
#section{ padding: 0px 8px 0px 8px;}
</style>
</head>
<body>
<div id="hader">
<img height="80" alt="Logo" src="http://www.blacki.in/image/logo.png" />
</div>
<div id="section">
<h3>###BETREFF###</h3>
<p>###NACHRICHT###</p>
</div>
<div id="footer">
<p><a href="http://www.blacki.in/impressum.php" >Impressum</a></p>
</div>
</body>
</html>
Die Emails werden aber immer noch als Spam deklariert.
Return-Path: <support@blacki.in>
Delivered-To: test@test.de
Received: from mx3.goneo.de (mx3.goneo.de [85.220.129.26])
by mailbox1.goneo.de (Postfix) with ESMTP id 50D3D11F92F
for <test@test.de>; Tue, 21 Jan 2014 18:01:59 +0100 (CET)
X-Virus-Scanned: by goneo
X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "Date"
X-Spam-Flag: YES
X-Spam-Score: 6.495
X-Spam-Level: ******
X-Spam-Status: Yes, score=6.495 tagged_above=-9999 required=1
tests=[AWL=0.046, BAYES_00=-1.9, FROM_MISSP_REPLYTO=1.129,
HTML_IMAGE_ONLY_12=2.059, HTML_MESSAGE=0.001, INVALID_MSGID=0.568,
MIME_HTML_ONLY=0.723, MISSING_DATE=1.36, RCVD_IN_DNSWL_NONE=-0.0001,
TO_NO_BRKTS_FROM_MSSP=2.499, T_REMOTE_IMAGE=0.01] autolearn=no
Received: from mx3.goneo.de ([127.0.0.1])
by localhost (mx3.goneo.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id idA6RaDlr-Q7 for <test@test.de>;
Tue, 21 Jan 2014 18:01:58 +0100 (CET)
X-policyd-weight: using cached result; rate: -5.5
Received: from mail-out1.b-one.net (mail-out1.one.com [91.198.169.18])
by mx3.goneo.de (Postfix) with ESMTP id 38F0723F12A
for <test@test.de>; Tue, 21 Jan 2014 18:01:58 +0100 (CET)
Received: from 212.86.178.62 by http://www.blacki.in via /test2.php with HTTP; Tue, 21 Jan 2014 17:01:57 +0000
To: test@test.de
Subject: [*** SPAM ***]-----17:50
X-PHP-Originating-Script: 1664197:test2.php
From: Blacki<support@blacki.in>
Reply-To: <test@test.de>
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1390323717 support@blacki.in>
X-Mailer: PHP v5.3.28
Date: Tue, 21 Jan 2014 18:01:59 +0100 (CET)