PHP mail() function with html not working -


i've got problem mail(). tried make html e-mail send website not working.

the code:

    $tresc = '<head>      <meta http-equiv="content-type" content="text/html; charset=utf-8">     <style type="text/css" media="screen">          .externalclass * {line-height: 100%}          /* début style responsive (via media queries) */          @media screen , (max-width: 480px) {             *[id=email-penrose-conteneur] {width: 100% !important;}             table[class=resp-full-table] {width: 100%!important; clear: both;}             td[class=resp-full-td] {width: 100%!important; clear: both;}             img[class="email-penrose-img-header"] {width:100% !important; max-width: 340px !important;}         }          /* fin style responsive */      </style>  </head>  <body style="background-color:#30606b">     <meta http-equiv="content-type" content="text/html; charset=utf-8">     <style type="text/css" media="screen">          .externalclass * {line-height: 100%}          /* début style responsive (via media queries) */          @media screen , (max-width: 480px) {             *[id=email-penrose-conteneur] {width: 100% !important;}             table[class=resp-full-table] {width: 100%!important; clear: both;}             td[class=resp-full-td] {width: 100%!important; clear: both;}             img[class="email-penrose-img-header"] {width:100% !important; max-width: 340px !important;}         }          /* fin style responsive */      </style> <div align="center" style="background-color:#30606b;">          <!-- début en-tête -->      <table id="email-penrose-conteneur" width="660" align="center" style="padding:20px 0px;" border="0" cellspacing="0" cellpadding="0">         <tr>             <td>                 <table width="660" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0">                     <tr>                         <td width="50%" style="text-align:center;">                             <a href="https://ss.pl"><img src="http://i.imgur.com/ogocclj.png" alt="logo" border="0"></a>                         </td>                      </tr>                 </table>             </td>         </tr>     </table>          <!-- fin en-tête -->      <table id="email-penrose-conteneur" width="660" align="center" style="border-right:1px solid #e2e8ea; border-top:1px solid #e2e8ea; border-bottom:1px solid #e2e8ea; border-left:1px solid #e2e8ea; background-color:#ffffff;" border="0" cellspacing="0" cellpadding="0">          <!-- début bloc "mise en avant" -->          <tr>             <td style="background-color:#6d8f97">                 <table width="660" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0">                     <tr>                         <td class="resp-full-td" valign="top" style="padding:20px; text-align:left;">                             <span style="font-size:30px; font-family:'helvetica neue', helvetica, arial, sans-serif; font-weight:100; color:#ffffff"><a href="" style="color:#ffffff; outline:none; text-decoration:none;">drogi użytkowniku!</a></span></p>                             <span style="font-size:16px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#fff"><p align="left">dziękujemy za rejestrację w serwisie ddd.pl!<br>nasz serwis wspaniała szansa na zdobycie wymarzonych nagród.<br><br>                             aby rozpocząć zabawę na naszym portalu musisz aktywować konto.<br>                         kliknij na przycisk '<b>aktywuj konto</b>' poniżej.</span>                          </td>                     </tr>                     <tr>                         <td width="100%" class="resp-full-td" valign="top" style="padding: 0px 20px 20px 20px;">                             <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin:auto; padding:auto;">                                 <tr>                                     <td style="background-color:#ffffff; border-radius:3px; padding: 10px 40px;">                                         <a style="font-family:'helvetica neue', helvetica, arial, sans-serif; text-align: center; text-decoration: none; display:block; color:#6d8f97; font-weight : 200; font-size: 25px;" href="#">aktywuj konto</a>                                      </td>                                  </tr>                             </table><span style="font-size:16px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#fff"><p align="left">w razie problemów, kliknij na bezpośredni link:                 <br><br> oto twoje dane logowania:<br><br> <b>login:</b><br> <b>hasło:</b><br><hr>                                    </td>                     </tr>                     <tr>                         <td width="100%" valign="top">                             <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin:auto; padding:auto;">                                 <tr>                                     <td style="text-align:center; padding:0px 20px;">                                         <img src="http://i.imgur.com/f9nioff.png" class="email-penrose-img-header" alt="prezent_grafika" border="0" style="display:block">                                     </td>                                 </tr>                             </table>                         </td>                     </tr>                 </table>             </td>         </tr>          <!-- fin bloc "mise en avant" -->         <!-- début article 1 -->          <tr>             <td style="border-bottom: 1px solid #e2e8ea">                 <table width="660" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0" style="padding:20px;">                     <tr>                         <td width="100%">                             <table width="120" align="left" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" style="text-align: center;"><img src="http://i.imgur.com/a2nypke.jpg" width="120px" style="border-radius:3px;" alt="kubek_obrazek" border="0">                                     </td>                                 </tr>                             </table>                             <table width="1" align="left" class="resp-full-table" border="0" cellpadding="0" cellspacing="0" >                                 <tr>                                     <td width="100%" height="20"></td>                                 </tr>                             </table>                             <table width="480" align="right" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="text-align : justify;">                                         <a href="#" style="outline:none; text-decoration:none"><span style="font-size:25px; font-weight: bold; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131;">zgarnij kubek</span></a><br />                                         <hr align="left" style="width:100px; margin-left:0px; text-align:left; background-color:#2ecc71; color:#2ecc71; height: 2px; border: 0 none;" />                                         <span style="font-size:16px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131">aktualnie trwa akcja pod nazwą "kubek z poleconych". zbierz 20 poleconych odbierz swoją pierwszą nagrodę w naszym serwisie - kubek! więcej informacji znajdziesz klikając w przycisk poniżej.</span>                                     </td>                                 </tr>                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="padding-top:20px;">                                         <table align="right" border="0" cellspacing="0" cellpadding="0">                                             <tr>                                                 <td style="background-color:#2ecc71; border-radius:3px; padding: 6px 24px;">                                                     <a style="font-family:'helvetica neue', helvetica, arial, sans-serif; color:#ffffff; text-align: center; text-decoration: none; display:block; font-weight : 200; font-size: 16px;" href="#">więcej o kubku</a>                                                 </td>                                             </tr>                                         </table>                                     </td>                                 </tr>                             </table>                         </td>                     </tr>                 </table>             </td>         </tr>          <!-- fin article 1 -->         <!-- début article 2 -->          <tr>             <td style="border-bottom: 1px solid #e2e8ea">                 <table width="660" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0" style="padding:20px;">                     <tr>                         <td width="100%">                             <table width="120" align="left" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" style="text-align: center;"><img src="http://i.imgur.com/6ibiiv1.jpg" width="120px" style="border-radius:3px;" alt="image article 2" border="0">                                     </td>                                 </tr>                             </table>                             <table width="1" align="left" class="resp-full-table" border="0" cellpadding="0" cellspacing="0" >                                 <tr>                                     <td width="100%" height="20"></td>                                 </tr>                             </table>                             <table width="480" align="right" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="text-align : justify;">                                         <a href="#" style="outline:none; text-decoration:none"><span style="font-size:25px; font-weight: bold; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131;">oficjalny konkurs</span></a><br />                                         <hr align="left" style="width:100px; margin-left:0px; text-align:left; background-color:#2ecc71; color:#2ecc71; height: 2px; border: 0 none;" />                                         <span style="font-size:16px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131">na naszej stronie trwa konkurs, w którym wygrania są punkty, długopis, nawet pendrive 16gb! wystarczy, że zrobisz zdjęcie... więcej informacji uzyskasz klikając w przycisk poniżej.</span>                                     </td>                                 </tr>                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="padding-top:20px;">                                         <table align="right" border="0" cellspacing="0" cellpadding="0">                                             <tr>                                                 <td style="background-color:#2ecc71; border-radius:3px; padding: 6px 24px;">                                                     <a style="font-family:'helvetica neue', helvetica, arial, sans-serif; color:#ffffff; text-align: center; text-decoration: none; display:block; font-weight : 200; font-size: 16px;" href="#">więcej o konkursie</a>                                                 </td>                                             </tr>                                         </table>                                     </td>                                 </tr>                             </table>                         </td>                     </tr>                 </table>             </td>         </tr>          <!-- fin article 2 -->         <!-- début article 3 -->          <tr>             <td style="border-bottom: 1px solid #e2e8ea">                 <table width="660" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0" style="padding:20px;">                     <tr>                         <td width="100%">                             <table width="120" align="left" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" style="text-align: center;"><img src="http://i.imgur.com/m9yrvxg.jpg" width="120px" style="border-radius:3px;" alt="fanpage_obrazek" border="0">                                     </td>                                 </tr>                             </table>                             <table width="1" align="left" class="resp-full-table" border="0" cellpadding="0" cellspacing="0" >                                 <tr>                                     <td width="100%" height="20"></td>                                 </tr>                             </table>                             <table width="480" align="right" class="resp-full-table" style="border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;" border="0" cellspacing="0" cellpadding="0">                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="text-align : justify;">                                         <a href="#" style="outline:none; text-decoration:none"><span style="font-size:25px; font-weight: bold; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131;">oficjalny fanpage</span></a><br />                                         <hr align="left" style="width:100px; margin-left:0px; text-align:left; background-color:#2ecc71; color:#2ecc71; height: 2px; border: 0 none;" />                                         <span style="font-size:16px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#313131">jak większość firm, tak posiadamy swoja stronę na facebooku. polub ją być na bieżąco. dodatkowo, na fanpage'u pojawią się konkursy z nagrodami - nie przegap tej szansy!</span>                                     </td>                                 </tr>                                 <tr>                                     <td width="100%" class="resp-full-td" valign="top" style="padding-top:20px;">                                         <table align="right" border="0" cellspacing="0" cellpadding="0">                                             <tr>                                                 <td style="background-color:#2ecc71; border-radius:3px; padding: 6px 24px;">                                                     <a style="font-family:'helvetica neue', helvetica, arial, sans-serif; color:#ffffff; text-align: center; text-decoration: none; display:block; font-weight : 200; font-size: 16px;" href="#">polub nasz fanpage</a>                                                 </td>                                             </tr>                                         </table>                                     </td>                                 </tr>                             </table>                         </td>                     </tr>                 </table>             </td>         </tr>          <!-- fin article 3 -->        <table id="email-penrose-conteneur" width="600" align="center" style="padding:20px 0px;" border="0" cellspacing="0" cellpadding="0">         <tr>             <td>                 <table width="600" class="resp-full-table" align="center" border="0" cellspacing="0" cellpadding="0">                     <tr>                         <td width="100%" class="resp-full-td" style="text-align: center;"><span style="font-size:12px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#aeb2b3">otrzymałeś tę wiadomość, ponieważ założyłeś konto na .pl.<br>nasz serwis wymaga aktywacji konta.<br>jeśli nie chcesz otrzymywać wiadomości oraz usunąć konto napisz: admin@pl.</span>                         <hr align="left" style="margin-left:0px; text-align:left; background-color:#aeb2b3; color:#aeb2b3; height: 1px; border: 0 none;" />                         <span style="font-size:12px; font-family:'helvetica neue', helvetica, arial, sans-serif; color:#aeb2b3">design penrose & edited .pl</span>                         </td>                     </tr>                 </table>             </td>         </tr>     </table>      <!-- fin footer -->  </div> </body> ';                     mail($tomail,$topic,$tresc."\n\n\n".$stopka, "from: $admin_mail\r\n"         ."reply-to: $from\r\nmime-version: 1.0\r\n"."content-type: text/html; charset=iso-8859-2\r\n "); 

please me guys! when have got this, website not working (internal 500). i'm making wrong? word 'tresc' means 'text'

in kliknij na przycisk '<b>aktywuj konto</b>' poniżej.</span> lost ' string continiuity should use \' instead. should replace occurences ' in body of message \'.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -