php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2010

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 28.02.2010, 19:50  
Erfahrener Benutzer
 
Registriert seit: 16.03.2004
Beiträge: 170
Kori
Standard [Erledigt] PHP - mail() - html Mail wird konstant als plain text verschickt. Warum?

Moin Jungs & Mäddels,

schaut mal, was mach ich falsch... die Mail kommt konstant als Plain Text an und lässt sich nicht als HTML Version betrachten, das mach ich falsch:

PHP-Code:
$message '<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>GProfit.de Newsletter 02 2010</title>
  <style type="text/css" media="screen">
      body {
        background-color: #e6e6e6;
        background: url(http://gprofit.de/newsletter/10/02/bg.jpg);
        background-position: top center;
        background-repeat: no-repeat repeat-y;
        margin: 0;
        padding: 0;
      }

      a img {
        border: none;
      }

      table.main {
        background-color: #ffffff;
      }

      td.permission {
        padding: 10px 0 10px 0;
      }

      td.permission p {
        font-family: Arial;
        font-size: 11px;
        font-weight: normal;
        color: #333333;
        margin: 0;
        padding: 0;
      }

      td.permission p a {
        font-family: Arial;
        font-size: 11px;
        font-weight: normal;
        color: #333333;
      }

      td.header {
        background-color: #5dac29;
        padding: 0 0 2px 0;
      }

      td.header h1 {
        font-family: \'Gill Sans\', \'Arial Black\', sans-serif;
        font-size: 35px;
        font-weight: bold;
        color: #ffffff;
        margin: 0 0 0 10px;
        padding: 0;
        display: inline;
      }

      td.date {
        padding: 8px 0 8px 0;
      }

      td.date p {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #666666;
        margin: 0;
        padding: 0;
      }

      td.sidebar ul {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #000000;
        margin: 10px 0 10px 24px;
        padding: 0;
      }

      td.sidebar ul li a {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #000000;
        text-decoration: none;
      }

      td.sidebar p {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #4c4c4c;
        margin: 10px 0 0 0;
        padding: 0;
      }

      td.sidebar p a {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #6cb9ce;
      }

      td.sidebar h4 {
        font-family: Georgia;
        font-size: 13px;
        font-weight: bold;
        color: #333333;
        margin: 14px 0 0 0;
        padding: 0;
      }

      td.sideHeader h3 {
        font-family: Georgia, serif;
        font-size: 18px;
        font-weight: bold;
        color: #ffffff;
        margin: 0;
        padding: 0;
      }

      td.sideTitle h3 {
        font-family: Georgia, serif;
        font-size: 18px;
        font-weight: bold;
        color: #ffffff;
        margin: 0;
        padding: 0;
      }

      td.mainbar h2 {
        font-family: Georgia;
        font-size: 18px;
        font-weight: bold;
        color: #ffffff;
        margin: 0;
        padding: 0;
      }

      td.mainbar h2 a {
        font-family: Georgia;
        font-size: 18px;
        font-weight: bold;
        color: #ffffff;
        text-decoration: none;
      }

      td.mainbar p {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #4c4c4c;
        margin: 10px 0 0 0;
        padding: 0;
      }

      td.mainbar p.more {
        padding: 0 0 10px 0;
      }

      td.mainbar p a {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #6cb9ce;
      }

      td.mainbar p img {
        border-bottom: 4px solid #edc913;
      }

      td.mainbar ul {
        font-family: Arial;
        font-size: 12px;
        font-weight: normal;
        color: #4c4c4c;
        margin: 10px 0 10px 0;
        padding: 0;
        list-style-position: inside;
      }

      td.footer {
        padding: 10px 0 10px 0;
      }

      td.footer p {
        font-family: Arial;
        font-size: 11px;
        font-weight: normal;
        color: #333333;
        margin: 0;
        padding: 0;
      }
  </style>

</head>
<body>

<table width="100%" cellspacing="10" cellpadding="0">
  <tr>
      <td align="center" valign="top">
       
        <table width="580" border="0" cellspacing="0" cellpadding="0" class="main">
            <tr>
              <td align="center" class="permission">
                  <p>Dieser Newsletter wird zur Verf&uuml;gung gestellt von .</p>
                  <p>Kein Interesse mehr am Newsletter? <unsubscribe>Abbestellen</unsubscribe>. Probleme mit der Darstellung dieser Email? <webversion><a href="http://gprofit.de/newsletter/">Seite im Browser ansehen</a></webversion>.</p>
              </td>
            </tr>
            <tr>
              <td height="90" valign="bottom" align="left" class="header">
                  <img src="http://gprofit.de/newsletter/10/02/header.gif" width="580" height="90" alt="ABC Widgets" />
              </td>
            </tr>
            <tr>
              <td align="center">
                 
                  <table width="550" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="192"></td>
                        <td></td>
                        <td class="date"><p>Sonntag, 28. Februar 2010</p></td>
                    </tr>
                    <tr align="left" rowspan="3" valign="top">
                       
                        <td width="192" valign="top" class="sidebar" align="left">

                          <table width="100%" cellspacing="0" cellpadding="4" bgcolor="#eeeeee">
                              <tr>
                                <td bgcolor="#000000" class="sideHeader">
                                    <h3>News</h3>
                                </td>
                              </tr>
                              <tr>
                                <td>
                                    <ul>
                                      <li><a href="#">26.02.2010 | Ford Ka<br />Hohe Verg&uuml;tung f&uuml;r Probefahrt!</a></li>
                                      <li><a href="#">21.02.2010 | RefRallye<br />Ausahlungen wurden soeben get&auml;tigt</a></li>
                                    </ul>
                                </td>
                              </tr>
                          </table>
                         
                          <img src="http://gprofit.de/newsletter/10/02/smallspacer.gif" width="192" height="25" />

                          <table width="100%" cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td class="sideTitle">
                                    <h3>Andere News</h3>
                                </td>
                              </tr>
                          </table>
                          <h4>GProfit im M&auml;rz.</h4>
                          <p>F&uuml;r M&auml;rz stehen dicke Rallyes und weitere dicke Sachen an.</p>

                          <img src="http://gprofit.de/newsletter/10/02/smallhr.gif" width="190" height="19" />

                          <h4>Rekordmonat Februar</h4>
                          <p>Durch die Aktionen in den letzten Wochen des Monats haben wir eine neuen Mitgliederrekord.</p>

                          <img src="http://gprofit.de/newsletter/10/02/smallhr.gif" width="190" height="19" />
                         
                          <img src="http://gprofit.de/newsletter/10/02/smallspacer.gif" width="192" height="25" />

                          <table width="100%" cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td class="sideTitle">
                                    <h3>Weitersagen</h3>
                                </td>
                              </tr>
                          </table>
                          <p>Du m&ouml;chtest jemanden nach GProfit einladen und 10% seines Umsatzes f&uuml;r dich ausgezahlt bekommen? Dann empfehle GProfit.de an einen Freund.  <forwardtoafriend>Jetzt Freund einladen.</forwardtoafriend>.</p>

                          <img src="http://gprofit.de/newsletter/10/02/smallhr.gif" width="190" height="19" />

                          <img src="http://gprofit.de/newsletter/10/02/smallspacer.gif" width="192" height="25" />

                          <table width="100%" cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td class="sideTitle">
                                    <h3>Abmelden</h3>
                                </td>
                              </tr>
                          </table>
                          <p>Um den Newsletter abzubestellen besuche bitte diesen Link.</p>

                          <img src="http://gprofit.de/newsletter/10/02/smallhr.gif" width="190" height="19" />
                        </td>

                        <td width="28"></td>

                        <td width="330" valign="top" class="mainbar" align="left">

                          <table cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td>
                                    <h2>Schnell gutes Geld im Internet</h2>
                                </td>
                              </tr>
                          </table>

                          <p>Jetzt kostenlos auf <a href="http://www.gprofit.de" title="GProfit.de Webseite besuchen">www.GProfit.de</a> anmelden und bares Geld verdienen!<br />
Du bist knapp bei Kasse oder würdest gerne etwas mehr zur&uuml;cklegen?<br />
Du willst dir schnell und einfach ein paar Euro dazuverdienen?<br />
Dann bist du bei GProfit genau richtig!<br />
Bei uns verdienst du Geld f&uuml;r die Teilnahme an unseren kostenlosen Aktionen.</p>
                          <p class="more"><a href="http://gprofit.de/principle.php">Mehr lesen</a></p>

                          <img src="http://gprofit.de/newsletter/10/02/hr.gif" width="329" height="27" />

                          <table cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td>
                                    <h2>Unser Service ist einmalig im Web!</h2>
                                </td>
                              </tr>
                          </table>



                          <p><img src="http://gprofit.de/newsletter/10/02/contentImage.jpg" /></p>
                          <p>Du kannst an Gewinnspielen teilnehmen, Newsletter abbonieren, dich in Communities anmelden und viel mehr und bekommst dafür von uns eine kleine aber feine Vergütung!
Ja, du hast richtig gelesen! Du bekommst Geld für das, was du wahrscheinlich so oder so schon häufig im Internet machst!</p>
                          <p class="more"><a href="http://gprofit.de/vantages.php">Mehr lesen</a></p>

                          <img src="http://gprofit.de/newsletter/10/02/hr.gif" width="329" height="27" />

                          <table cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td>
                                    <h2>Wir stehen f&uuml;r Qualit&auml;t</h2>
                                </td>
                              </tr>
                          </table>
                          <p>Und das beste ist, unsere Aktionen sind alle seriös und 100% kostenlos!<br />
Keine Abofallen und keine versteckten Kosten, das garantieren wir dir!<br /><br />Schon in wenigen Tagen kannst du die Auszahlungsgrenze von nur 5 Euro erreichen und wir zahlen wir den Betrag binnen ein paar weiterer Tage auf dein PayPal- oder Bankkonto aus!</p>
                          <ul>
                              <li>Hohe Verg&uuml;tungen</li>
                              <li>Zuverl&auml;ssige Auszahlungsrotationen</li>
                              <li>Nur kontrollierte Partner</li>
                          </ul>
                          <p class="more"><a href="http://gprofit.de/faq.php">Mehr lesen</a></p>

                          <img src="http://gprofit.de/newsletter/10/02/hr.gif" width="329" height="27" />

                          <table cellspacing="0" cellpadding="4" bgcolor="#000000">
                              <tr>
                                <td>
                                    <h2>Mitmachen = mitverdienen!</h2>
                                </td>
                              </tr>
                          </table>



                          <p><img src="http://gprofit.de/newsletter/10/02/contentImage2.jpg" width="206" height="118" alt="Mitmachen und Mitverdienen!"  align="left" hspace="10" />Und das war noch nicht mal alles! Wirb Freunde, Bekannte, Angehörige oder Geschäftspartner und du erhällst dauerhaft 10% auf deren Verdienste, einfach so ohne noch etwas dafür zu tun!<br />
10 geworbene Freunde verdienen jede Woche 10 Euro, das würde für dich schon weitere 10 Euro pro Woche.<br />
<br />
Und um dir deinen Start auf GProfit noch angenehmer zu gestalten, bekommst du von uns 1 Euro Startbonus geschenkt! Gib einfach bei der Registrierung auf www.GProfit.de den Gutscheincode "Diebgame" ein und dann kannst du auch schon loslegen.
<br /><br />
<br />
Die <a href="http://gprofit.de/signup.php" title="Jetzt anmelden!">Anmeldung</a> ist kostenlos und unverbindlich, probiere es doch einfach aus.
Verdiene jetzt auf <a href="http://www.gprofit.de" title="GProfit Website besuchen">www.GProfit.de</a></p>
                          <p class="more"><a href="http://gprofit.de/signup.php">Jetzt anmelden</a></p>

                          <img src="http://gprofit.de/newsletter/10/02/hr.gif" width="329" height="27" />
                        </td>
                    </tr>
                  </table>
                 
              </td>
            </tr>
            <tr>
              <td align="center" class="footer">
                  <p>&copy; 2009 GProfit.de.</p>
                  <p>GProfit.de — Rika NetMarketing GmbH, Hastenrather Weg 81, 52249 Eschweiler, Deutschland</p>
              </td>
            </tr>
        </table>

      </td>
  </tr>
</table>


</body>
</html> '
;
$to      "testaddy@gmx.de";
$subject "Betrefftext";
$xtra    "From: ab@sender.de (Ab Sender)\r\n";
$xtra   .= "Content-Type: text/html\r\nContent-Transfer-Encoding: 8bit\r\n";
$xtra   .= "X-Mailer: PHP "phpversion();
 
mail($to,
     
$subject,
     
$message,
     
$xtra); 
Liebe Grüße,
Kori

Geändert von Kori (28.02.2010 um 19:55 Uhr). Grund: Unaussagekräftiger Titel
Kori ist offline  
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 28.02.2010, 20:34  
Moderator
 
Benutzerbild von robo47
 
Registriert seit: 03.09.2004
Beiträge: 11.792
PHP-Kenntnisse:
Fortgeschritten
robo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz seinrobo47 kann auf vieles stolz sein
Standard

Nutze eine Mail-Klasse!

Mail() ist tot, es lebe mail() - Robo47.net
robo47 ist offline  
Alt 28.02.2010, 20:40  
Erfahrener Benutzer
 
Registriert seit: 16.03.2004
Beiträge: 170
Kori
Standard

Zitat:
Zitat von robo47 Beitrag anzeigen
danke!
Kori ist offline  
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
[Erledigt] mail() fett ohne HTML webproger PHP Tipps 2009 4 02.07.2009 16:20
[Erledigt] mail() mit &lt;a herf... Link in Html Mail geht nicht!? BettinaSyn PHP Tipps 2009 11 16.05.2009 22:28
[Erledigt] HTML eMail richtig anzeigen, mail() und phpmailer Knutschi PHP Tipps 2009 5 13.05.2009 09:27
html formular mit einer php mail funktion basti-erfurt Scriptbörse 3 07.12.2008 15:21
[Erledigt] HTML Mail mit Lücken mitten in den Worten, wie kommt das? DeeFour PHP-Fortgeschrittene 2 29.05.2008 15:47
Problem beim erstellen einer HTML Mail... GELight PHP Tipps 2006 15 06.10.2006 00:27
HTML Mail mit Code über Formular/Textfeld madSoul PHP Tipps 2006 5 28.04.2006 12:33
html mail CHRIS PHP Tipps 2005-2 3 18.10.2005 21:44
html mail versenden PHP Tipps 2005-2 3 17.09.2005 13:48
Mit der PHP mail() Funktion eine HTMl mail verschicken? PHP Tipps 2005 6 09.05.2005 07:13
[Erledigt] html mit mail versenden PHP-Fortgeschrittene 0 27.01.2005 19:53
bilder in html mail PHP-Fortgeschrittene 11 10.01.2005 20:03
mehrere Atachement mit HTML Mime mail class??? 18inch PHP Tipps 2004-2 1 28.11.2004 23:58
html mail PHP Tipps 2004 2 03.08.2004 09:05
Antwort mail aus Kontaktformular in HTML, aber wie?! medico PHP Tipps 2004 2 14.07.2004 16:30

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
php html mail verschicken, php html mail, http://www.gprofit.de/gcenter.php#, php mail html plain text, a href im newsletter php problem, php mail plain text, html mails mit php versenden, php code snippets, php mail header daten stehen im email text, html email nur txt php, php email mit html text, img src und text, gmx.es/mail.html, php mail margin, $text .= php email, plain statt html, gprofit, php mail kommt als text an, plain und html email php, php mail html kommt als plain text

Alle Zeitangaben in WEZ +2. Es ist jetzt 21:28 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum