|
|||
HTML E-Mails
Hi,
ich bin gerade am experimentieren mit HTML E-Mails und bin dabei auf ein Problem gestoßen. Erst Mal der Text, wie er ausgeliefert wird: HTML-Code:
Received: from spooler by localhost (Mercury/32 v4.72); 11 Oct 2010 16:12:08 +0200 X-Envelope-To: <newuser@localhost> Return-path: <kontoaktivierung@example.com> Received: from - (127.0.0.1) by localhost (Mercury/32 v4.72) ID MG00000B; 11 Oct 2010 16:12:08 +0200 Subject: example.com - Kontoaktivierung To: newuser@localhost Date: Mon, 11 Oct 2010 16:12:08 +0200 From: "example.com" <kontoaktivierung@example.com> Message-ID: <0aa4bfd8b2e3ec43a8a8b7d0258b0789@localhost> X-Priority: 3 X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/html; charset="utf-8" X-PMFLAGS: 34079360 0 0 YNN7MI5S.CNM <html> <head> <style type="text/css"> body{ letter-spacing: 1px; color: blue;} a{ color: #900; text-decoration: none; } a:hover{ color: #000; } p{ margin-top: 10px; } .liste{ margin-left: 15px; margin-top: -7px; line-height: 1.5; } .zeile{ margin-left: 80px; margin-top: -3px; height: 30px; width: 350px; } .breit{ width: 150px; display: inline-block; font-weight:bold; color:#900; } </style> </head> <body>Hallo Test,<p> um dein Konto zu aktivieren, klicke einfach auf folgenden Link: <a href="http://localhost/example.com/registrieren.php?id=27&acode=C6fjXckMVoQ0aG7MUpYn7UYdu4INYltpRU0H">Klick mich!</a> <br /> <br /> Falls dein E-Mail Provider keine Links unterstützt, kannst du es auch manuell aktivieren: <br /> <div class="liste"> Schritt 1: Geh auf www.example.com<br /> Schritt 2: Klick auf den Menüpunkt "Registrieren"<br /> Schritt 3: Scroll an das Ende der Seite und gib folgende Daten ein: <br /> <div class="zeile"><div class="breit">ID:</div>00999</div> <div class="zeile"><div class="breit">Aktivierungscode:</div>asdfaf3i9i3asdfnnceei </div> </div> <br /> Großformel etc. <br /> <br /> Dein example.com Team </p> </body> </html>
Wenn ich den Quelltext in Browser ansehe(also in Datei kopiere...) dann wird alles korrekt angezeigt. Danke schon Mal für eure Hilfe LG rs-web
__________________
Small boy wrote to Santa Claus:"Send me a brother!" Santa wrote back: "Send me your mother" |
Sponsored Links |
Sponsored Links |
|
|||
Hi,
danke für deine Antwort. Ich wollte die E-Mail eig. ein bisschen grafisch aufpeppen. Aber bevor ich mich jetzt mit Tabellen rumschlage lass ich es bei Text/PLAIN. Aber ein Fehler ist jetzt nicht drin oder? LG rs-web
__________________
Small boy wrote to Santa Claus:"Send me a brother!" Santa wrote back: "Send me your mother" |
|
|||
Ok,
ich habs jetzt doch mit Tabellen gemacht. Vll nicht perfekt aber es wird fast richtig angezeigt: HTML-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-oransitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-de" lang="de-de" > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css"> body{ letter-spacing: 1px; } a{ text-decoration: none; color:#900; } a:hover{ color: #000; } .abstand{ padding-top: 7px; } .abstand1{ padding-top: 20px; } .abstand2{ padding-top: 14px; padding-left: 50px; } .abstand3{ padding-top: 5px; padding-left: 50px; } .abstand4{ padding-top: 18px; padding-left: 100px; font-weight: bold; letter-spacing: 2px; } .abstand5{ padding-left: 100px; font-weight: bold; width: 200px; letter-spacing: 2px; padding-bottom: 25px; } .abstand6{ padding-bottom: 23px; } .breit{ letter-spacing: 1px; color: #900; } </style> </head> <body> <table> <tr><td>Hallo Test,</td></tr> <tr><td class="abstand">um dein Konto zu aktivieren, klicke einfach auf folgenden Link: <a href="http://localhost/example/registrieren.php?id=000030&acode=">Klick mich!</a></td></tr> <tr><td class="abstand1">Falls dein E-Mail Provider keine Links unterstützt, kannst du es auch manuell aktivieren:</td></tr> <tr><td class="abstand2">Schritt 1: Geh auf example.com</td></tr> <tr><td class="abstand3">Schritt 2: Klick auf den Menüpunkt "Registrieren" und scroll nach ganz Unten</td></tr> <tr><td class="abstand3">Schritt 3: Gib folgende Daten ein:</td></tr> <tr><td class="abstand4"><span class="breit">ID: </span>09090909</td></tr> <tr><td class="abstand5"><span class="breit">Aktivierungscode: </span>adsfasfasdfdsfasdf</td></tr> <tr><td class="abstand6">Viel Spaß beim Knobeln wünscht dir</td></tr> <tr><td>Dein example.com Team</td></tr> </table> </body> </html> Und der Validor sagt: : end tag for "head" which is not finished aber ich doch alle Tags geschlossen... Danke schon Mal LG rs-web
__________________
Small boy wrote to Santa Claus:"Send me a brother!" Santa wrote back: "Send me your mother" |
|
|||
Ok danke,
ich hab da noch ne Frage: Wie kann ich bei Text E-Mails einen Link eibauen? Oder geht das nicht? LG rs-web
__________________
Small boy wrote to Santa Claus:"Send me a brother!" Santa wrote back: "Send me your mother" |
|
|||
Zitat:
Aber, jededer halbwegs gute Client formatiert Links im Textformat automatisch in einen klickbaren Verweis. Du solltest dir darüber also keine Gedanken machen. Vermeide nur, dass übermäßig viele Sonderzeichen im Verweis vorkommen, z.B. ";".
__________________
Über Internet Explorer 8: Noch bis 8. April 2014 wird der Internet Explorer 6 mit Sicherheitsupdates versorgt. Bereits jetzt kann dieser Browser aber vollständig durch den IE8 ersetzt werden. Ältere Betriebssysteme und Browserversionen werden von Microsoft nicht mehr unterstützt. Auch Programme, die den IE7 benötigen, sind kein Argument gegen IE8, da dieser über entsprechende Kompatibilitätsschichten verfügt. Ab sofort gilt daher der Internet Explorer 8 als vorausgesetzer Mindeststandard. |
|
|||
Ok,
danke euch beiden. Dann werde ich das & direkt ohne html formatiertung reinschreiben. @uspri: Ist das auf mein Bsp bezogen, oder nur ein allgemeiner Hinweis? LG rs-web
__________________
Small boy wrote to Santa Claus:"Send me a brother!" Santa wrote back: "Send me your mother" |
Sponsored Links |
|
||||
Allgemeine Aussage zu dem Thema.
Schreib einfach ganz normalen Text, gib als Content-Type text/plain an und die Zeilenumbrüche dann mit \r\n. So mache ich das und fahre damit sehr gut bis jetzt, zumindestens sind mir noch keinerlei Beschwerden zu Ohren gekommen. |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
HTML Mails richtig erstellen | Ben. | Serveradministration und serverseitige Scripte | 2 | 07.04.2011 13:33 |
Redesign für Steiner Cycling Team | pkipper | Site- und Layoutcheck | 11 | 09.02.2011 12:25 |
Wie parse ich mit php Markdown syntax nach html? | asdfgqw | Serveradministration und serverseitige Scripte | 0 | 03.06.2008 00:11 |
Free mail account und Mails im HTML Format zu send | Mr.NO | Offtopic | 0 | 20.01.2005 13:20 |
Versenden von HTML Mails mit CSS | tritratrick | CSS | 1 | 20.08.2004 21:31 |