...

View Full Version : htm mail sending problem



zodehala
01-26-2010, 10:17 AM
my codes are like following. i wanna send it as html But it is sent as text



// HTML mail göndermek için içierk tipi ve başlık olamlı
$headers = 'MIME-Version: 1.0';
$headers .= 'Content-type: text/html; charset=iso-8859-9';
$headers .= 'From: '.$from .' <'.$email.'>' . "\r\n";


$to = "info@codingforums.com";
$subject = $konu." (".$baslik.")";
$message =
'

<!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="text/html; charset=iso-8859-9" />
<title>ADSL</title>
</head>
<body>
<table class="mail_tablo">

<tr>
<td class="mail_td1"><div align="right">name :</div></td>
<td>'.strip_tags($ad).'</td>
</tr>
<tr>
<td class="mail_td1"><div align="right">father name :</strong></div></td>
<td>'.strip_tags($akizlik).'</td>
</tr>
</table>
</body>
</html>
';
$ulak = imap_mail(
$to,
strip_tags($subject),
strip_tags($message,"<br>"),
$headers
);

Fou-Lu
01-26-2010, 02:11 PM
Using strip_tags on you're message will do that.
Remove the strip_tags call in the mail method. You want/need to keep all of you're markup not just you're <br /> tags.

zodehala
01-27-2010, 07:35 AM
Using strip_tags on you're message will do that.
Remove the strip_tags call in the mail method. You want/need to keep all of you're markup not just you're <br /> tags.

i removed all strip_tags but it is text message not html

Fou-Lu
01-27-2010, 12:24 PM
Does you're text include the markup? If so, chances are its a problem with you're mail configurations, not with you're sending of it. If not, double check you're not running a cached version of the page and try again.

zodehala
01-27-2010, 01:58 PM
my text and codes are like above

Fou-Lu
01-27-2010, 02:09 PM
Sounds to me then that its just the receiving of the email. Best I know, the imap methods handle the same header functionality as just the standard mail, so passing the content-type for the html should do it.

Oh wait a minute:


$headers = 'MIME-Version: 1.0';
$headers .= 'Content-type: text/html; charset=iso-8859-9';
$headers .= 'From: '.$from .' <'.$email.'>' . "\r\n";


That might be what's killing it. Change that to:


$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-9' . "\r\n";
$headers .= 'From: '.$from .' <'.$email.'>' . "\r\n";


Noticed I added the form feeds at the end of each header. Try that, post back.

zodehala
02-02-2010, 09:27 AM
this is incoming mail in outlook

http://divran.com/script/upload/images/snap2ogo.gif



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum