Mail Funktion
user76
- php
0 Mike©
Hallo,
ich versende wie folgt eine EMail:
mail("xxx@email.de", "Betreff", "$mailtext", "From: EMAIL email@email.de
Content-Type:text/plain");
Die EMail, die ich dann empfangen habe, sehen dann jedoch am Anfang wie folgt aus:
Content-Type:text/plain
Message-Id: XXXXXXXXXXXXXX@email.de
Wie kriege ich diese zwei Zeilen weg?
Danke
user76
Moin user76,
Content-Type:text/plain
Message-Id: XXXXXXXXXXXXXX@email.deWie kriege ich diese zwei Zeilen weg?
baue dir einen "richtigen" Mail Header:
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$header .= "Organization: ".$org_var."\r\n";
$header .= "Content-Transfer-encoding: 8bit\r\n";
$header .= "To: ".$ToReceiver."\r\n";
$header .= "From: ".$org_var." <".$FromSender.">\r\n";
$header .= "Reply-To: ".$org_var." <".$FromSender.">\r\n";
$header .= "Message-ID: <".md5(uniqid(time()))."@{$_SERVER['SERVER_NAME']}>\r\n";
$header .= "Return-Path: ".$domain_user."\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-MSmail-Priority: High\r\n";
$header .= "X-Mailer: Microsoft Office Outlook, Build 11.0.5510\r\n";
$header .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\r\n";
$header .= "X-Sender: ".$FromSender."\r\n";
$header .= "X-AntiAbuse: This is a solicited email for - ".$org_var." mailing list.\r\n";
$header .= "X-AntiAbuse: Servername - {$_SERVER['SERVER_NAME']}\r\n";
$header .= "X-AntiAbuse: User - ".$FromSender."\r\n";
mail ($ToReceiver, $Subject, $MsgText, $header, "-fabsender@hoster.de");
}
Entsprechende Variabeln bitte selbst befüllen.
regds
Mike©