Einzelnen Beitrag anzeigen

Benutzerbild von Harry Stahl
Harry Stahl

Registriert seit: 2. Apr 2004
Ort: Bonn
2.479 Beiträge
 
Delphi 11 Alexandria
 
#11

AW: HTML-Mail kommen bei Outlook-Empfängern nicht korrekt an

  Alt 9. Okt 2014, 22:05
Was ich noch vergessen habe zu erwähnen, ist, dass Du im Header der Mail den Content-Type als "multipart/related" angeben musst.

Dann kommt nach dem Header das "multipart/alternative" mit Deinem plain-Text, dem html-text und den Bild-Dateien, dann sollte es funktionieren.

Habe also gerade mal testweise eine HTML-Mail mit integriertem Bild an mich selber gesendet und diese einmal mit Safer Mail und ein andermal mit Outlook empfangen, beide Programm zeigen die Mail erwartungsgemäß als HTML-Mail mit integriertem Bild an.

Hier mal als Orientierung ein Auszug aus der EMPFANGENEN Mail, wie das beim Empfänger aussehen sollte, was Du versendest:

Code:
Return-Path: <info@hastasoft.de>
Received: from mailin51.aul.t-online.de ([172.20.27.0])
   by ehead311.aul.t-online.de (Dovecot) with LMTP id ZH8cLZ/wNlRPcQAAEswSrg;
   Thu, 09 Oct 2014 22:39:50 +0200
Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.218]) by mailin51.aul.t-online.de
   with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted - FP-SHA1:DC:11:97:B1:F6:37:0C:7C:09:A9:9C:E4:7D:13:F7:F9:81:08:F7:49)
   esmtp id 1XcKQ8-1mFVjs0; Thu, 9 Oct 2014 22:34:44 +0200
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1412886884; l=43802;
   s=domk; d=hastasoft.de;
   h=Content-Type:MIME-Version:Date:To:Subject:From;
   bh=kWnVUMFUlEQ5QLc6r9lPzdWnxZY=;
   b=v4TeD0DLMWnTEhcoCoRGmg4KDXkTj7XR+NmmSAdpPf3cuJ+yjdEXkqamLfj6DgHIQmr
   0RIrePbXySRLX1wJo/TU6lnI+jkpRMXTv3tSLnHs65T/HrbVbXZyujFA8eRqRFHG1SSMA
   srUmbiIRBFF18iEszdWH4eqKoGSMxZkz0Ac=
X-RZG-AUTH: :JWICemCgeuygPNAbdtGf3IGHB56ii1qJEtWHGAjGVNbDsLt5lyCX8TIXVd0=
Message-ID: <N0461cq99KYiWEc.RZmta@mo4-p00-ob.smtp.rzone.de>
X-RZG-CLASS-ID: mo00
Received: from Vertrieb (p5DE8C0E8.dip0.t-ipconnect.de [93.232.192.232])
   by smtp.strato.de (RZmta 35.10 DYNA|AUTH)
   with ESMTPSA id N0461cq99KYiWEc
   (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
   (Client did not present a certificate)
   for <harry.stahl@t-online.de>;
   Thu, 9 Oct 2014 22:34:44 +0200 (CEST)
Received: from Vertrieb[127.0.0.1] (helo=) by Vertrieb[127.0.0.1] with esmtp (Emil SMTP Server)
From: "Hastasoft Kontakt" <info@hastasoft.de>
Subject: Eine Testmail
To: harry.stahl@t-online.de
Date: Thu, 9 Oct 2014 22:35:03 +0200
MIME-Version: 1.0
Content-Type: multipart/related; boundary="fiR62JETL4=_hkQNPYgNADejHMWWLq89aP"
X-Mailer: Hastasoft Safer Mail 7.0-B233 [EE]
X-TOI-SPAM: n;1;2014-10-09T20:39:50Z
X-TOI-VIRUSSCAN: clean
X-TOI-EXPURGATEID: 149288::1412886884-000014B7-BA2EE0E2/0-0/0-0
X-TOI-SPAMCLASS: CLEAN, NORMAL
X-TOI-MSGID: 17364fe3-f7d7-4aae-a9ac-ddabd8a18728
X-Seen: false
X-ENVELOPE-TO: <harry.stahl@t-online.de>

This is a multi-part message in MIME format.


--fiR62JETL4=_hkQNPYgNADejHMWWLq89aP
Content-Type: multipart/alternative;
        boundary="w=_1FB5nccbxnP4sGT6KbJfaGXXq2uK0Yd"

--w=_1FB5nccbxnP4sGT6KbJfaGXXq2uK0Yd
Content-Type: text/plain ; charset="utf-8"
Content-Transfer-Encoding: base64

DQoNCkhhcnJ5IFN0YWhsIFNvZnR3YXJlDQorKysrKysrKysrKysrKysrKw0KVGVsOiAwMjI4LTkx
.... (entfernt)

--w=_1FB5nccbxnP4sGT6KbJfaGXXq2uK0Yd
Content-Type: text/html ; charset="utf-8"
Content-Transfer-Encoding: base64

PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
...(entfernt)

--w=_1FB5nccbxnP4sGT6KbJfaGXXq2uK0Yd--

--fiR62JETL4=_hkQNPYgNADejHMWWLq89aP
Content-Type: image/jpeg;
        name="image0.jpeg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="image0.jpeg"
Content-ID: <image0.jpeg>

/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsK
...(entfernt)

--fiR62JETL4=_hkQNPYgNADejHMWWLq89aP--
  Mit Zitat antworten Zitat