Re: why does a html mail send as text ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I attached my code
Thanks



Show your code, but it sounds like maybe the HTML flag is not set. Consider using a class like phpmailer or the mime mail class from phpclasses.org

Bastien

Sent from my iPod

On Feb 4, 2009, at 6:28, "Bulend Kolay" <bmalik@xxxxxxxxxxxx> wrote:

I use php-5.2.6 and apache2.2.x on opensuse11

I have a file called mailsend.php to send a mail of html format.
the server sends the mail form of html format. But I get it as text instead of html.
default_mimetype is set as text/html in php.ini file.

How can I correct this ?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

<?php
$im_val_isim = $HTTP_POST_VARS['isim'];
$im_val_firma = $HTTP_POST_VARS['firma'];
$im_val_ortak_isimleri = $HTTP_POST_VARS['ortak_isimleri'];
$im_val_adres = $HTTP_POST_VARS['adres'];
$im_val_ilce = $HTTP_POST_VARS['ilce'];
$im_val_sehir = $HTTP_POST_VARS['sehir'];
$im_val_tel_is = $HTTP_POST_VARS['tel_is'];
$im_val_tel_cep = $HTTP_POST_VARS['tel_cep'];
$im_val_fax= $HTTP_POST_VARS['fax'];
$im_val_web = $HTTP_POST_VARS['web'];
$im_val_email = $HTTP_POST_VARS['email'];
//$im_val_ =$HTTP_POST_VARS[''];


$icerik_gelen ='
<table width="466" border="0" cellspacing="0" cellpadding="2">
   <tr>
     <td width="6" class="style13"></td>
     <td width="96" align="left" class="style11">Adı - Soyadı</td>
     <td width="10" align="right" class="style11">&nbsp;</td>
     <td width="338" align="left">'.$im_val_isim.'</td>
   </tr>
   <tr bgcolor="#F4F4F4">
     <td width="6" class="style13"></td>
     <td align="left" class="style11">Firma ünvanı ve Å?irketin açık ismi</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_firma.'</td>
   </tr>
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Varsa Å?irket ortaklarının isimleri<br />      </td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_ortak_isimleri.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td width="6" class="style13">*</td>
     <td align="left" class="style11">Adres</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_adres.'</td>
   </tr>
   <tr>
     <td width="6" class="style13">*</td>
     <td align="left" class="style11">İlçe</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_ilce.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td width="6" class="style13">*</td>
     <td align="left" class="style11">Ä°l</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_sehir.'</td>
   </tr>
   <tr>
     <td width="6" class="style13">*</td>
     <td align="left" class="style11">Ä°Å? Tel</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_tel_is.'</td>
   </tr>
   <tr>
     <td bgcolor="#f4f4f4" class="style11">&nbsp;</td>
     <td align="left" bgcolor="#f4f4f4" class="style11">Cep Tel</td>
     <td align="right" bgcolor="#f4f4f4" class="style11">&nbsp;</td>
     <td align="left" bgcolor="#f4f4f4">'.$im_val_tel_cep.'</td>
   </tr>
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Fax</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left">'.$im_val_fax.'</td>
   </tr>
 </table>
<table width="574" border="0" cellspacing="0" cellpadding="2">
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Yalnız bayiliÄ?i mi istiyorsunuz?<br /></td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_yalniz_bayiligi.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td>&nbsp;</td>
     <td align="left"><span class="style11">VereceÄ?iniz banka teminat mektubunun miktarı nedir?</span></td>
     <td align="right">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_teminat_miktar.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Bayilik istediÄ?iniz Ä°l veya Ä°lçeler nedir?</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_istenen_il_ilce.'</td>
   </tr>
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Merkeziniz hangi Å?ehirde olacak?</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_merkez_sehir.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td>&nbsp;</td>
     <td align="left"><span class="style11">Bölgenizde Å?ube açmak, bayilik vermek istiyormusunuz, hangi Å?ehirlerde?</span> </td>
     <td align="right">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_bayilik_verilecek_yerler.'</td>
   </tr>
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">TeÅ?hir salonunuz kaç metre karedir?</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_teshir_salonu.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">TeÅ?hir salonunuz merkezde mi, cadde üzerinde mi, site içinde mi?</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_teshir_salonu_konum.'</td>
   </tr>
   <tr>
     <td class="style11">&nbsp;</td>
     <td align="left" class="style11">Kendinize ait veya anlaÅ?malı, TSEli veya normal servisiniz var mı?</td>
     <td align="right" class="style11">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_anlasmali_servis.'</td>
   </tr>
   <tr>
     <td>&nbsp;</td>
     <td align="left"><span class="style11">Tavsiye edeceÄ?iniz servislerin Å?ehirleri ve firma adları nelerdir?
     </td>
     <td align="right">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_tavsiye_servis.'</td>
   </tr>
   <tr bgcolor="#f4f4f4">
     <td>&nbsp;</td>
     <td align="left"><span class="style11">Ä°lk sipariÅ?iniz kaç adet olacak?</span></td>
     <td align="right">&nbsp;</td>
     <td align="left" class="style11">'.$im_val_ilk_siparis.'</td>
   </tr>
 </table>
';//end of $icerik_gelen


if ($step==1)
{
$subject = 'Apply Form';
$to = 'bmalik@xxxxxxxxxxxx';
               $tags_start = '<html><head></head><body>';
               $tags_end = '</body></html>';
$icerik = $tags_start;
$icerik = $icerik.$icerik_gelen;
$icerik = $icerik.$tags_end;

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=windows-1254' . "\r\n";
       if (mail($to, $subject, $icerik, $headers))
       {
               $email_sent=TRUE;
       }
}



?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="multipart/mixed; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style11 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; }
.style11_italik {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #000000; font-style:italic}
.style13 {
       font-family: Arial, Helvetica, sans-serif;
       font-size: 12px;
       color: #FF0000;
}
.style6 {
       font-size: 14px;
       color: #003366;
       font-family: Tahoma;
}
-->
</style>
</head>

<body>
<div align="center">
 <table width="600" border="0" cellpadding="0" cellspacing="0">
   <tr>
     <td width="300" height="13" align="center" valign="middle"><span class="style6">Bayi Form</span></td>
     <td width="299" align="center" valign="top"><img src="resimler/LOGO.png" width="193" height="43" /></td>
   </tr>
 </table>
<?php
if ($email_sent)
{
       echo '<table width="500" bgcolor="red" cellspacing="0" cellpadding="10">';
       echo '<tr>';
               echo '<td class="style14">';
                       echo 'BaÅ?vurunuz gönderilmiÅ?tir. TeÅ?ekkür ederiz.';
               echo '</td>';
       echo '</tr>';
       echo '</table>';
}

if (!$email_sent && $step==1)
{
       echo '<table width="500" bgcolor="red" cellspacing="0" cellpadding="10">';
       echo '<tr>';
               echo '<td class="style14">';
                       echo '!!!BaÅ?vurunuz gönderilmemiÅ?tir. Lütfen tekrar deneyiniz.';
               echo '</td>';
       echo '</tr>';
       echo '</table>';
}

?> </div>
<form id="form1" name="form1" method="post" action="form1.php">
 <div align="center">
   <table width="466" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td width="466" class="style13">* alanların doldurulması zorunludur.<br />
       <br /></td>
     </tr>
     </table>
   <table width="466" border="0" cellspacing="0" cellpadding="2">
     <tr>
       <td width="6" class="style13">*</td>
       <td width="96" align="left" class="style11">Adı - Soyadı</td>
       <td width="10" align="right" class="style11">&nbsp;</td>
       <td width="338" align="left"><label>
         <input name="isim" type="text" id="isim" size="25" maxlength="40" />
       </label></td>
     </tr>
     <tr bgcolor="#f4f4f4">
       <td width="6" class="style13">*</td>
       <td align="left" class="style11">Ä°l</td>
       <td align="right" class="style11">&nbsp;</td>
       <td align="left"><label>
         <select name="sehir" id="sehir">
<?php
$sehir = array (
array ("1", "NEWYORK"),
); //end of $sehir.
for ($i=0 ; $i<sizeof ($sehir ) ; $i++)
{
       echo '<option value ="'.$sehir[$i][1].'">'.$sehir[$i][1].'</option>';
}
?> </select>
       </label></td>
     </tr>
     <tr>
       <td width="6" class="style13">*</td>
       <td align="left" class="style11">Ä°Å? Tel</td>
       <td align="right" class="style11">&nbsp;</td>
       <td align="left"><input name="tel_is" type="text" id="tel_is" size="25" maxlength="15" /></td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td align="left">&nbsp;</td>
       <td align="right">&nbsp;</td>
       <td>&nbsp;</td>
     </tr>
     </table>
   <table width="466" border="0" cellspacing="0" cellpadding="2">
     <tr bgcolor="#f4f4f4">
       <td width="1" class="style11">&nbsp;</td>
       <td width="176" align="left" class="style11">Bütün araçlarımızın bayiliÄ?ini istiyormusunuz?<br /></td>
       <td width="13" align="right" class="style11">&nbsp;</td>
       <td width="260" align="left" class="style11">
<input type="radio" name="tum_arac_bayiligi" id="tum_arac_bayiligi" value="evet" />Evet <input type="radio" name="tum_arac_bayiligi" id="tum_arac_bayiligi" value="hayir" />Hayır
       </td>
     </tr>
     <tr>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td align="left"><input name="step" type="hidden" id="step" value="1" /></td>
     </tr>
     </table>
 </div>
 <p align="center">
   <label>
   <input type="submit" name="button" id="button" value="Gönder" />
   </label>
 </p>
</form>
<p align="center">&nbsp;</p>
</body>
</html>
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux