#1  
Old 11th April 2011, 05:59
leo3d1 leo3d1 is offline
Junior Member
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP Mail don't send HTML

Hello, I'm Leo from Brazil and I have a server with Ubuntu 10.04 and ISPConfig 2.

I'm trying to send emails through mail() function, BUT when I recive in Outlook, it comes only in plain text, like:

"Content-type: text/html; charset=iso-8859-1
From: dfasdf@sigmatica.com.br
Message-Id: <20110411024409.8F704181FE@sigmatica.com.br>
Date: Sun, 10 Apr 2011 19:44:09 -0700 (PDT)
X-Antivirus: avast! (VPS 110410-1, 10/04/2011), Inbound message
X-Antivirus-Status: Clean

<html>
<body>

Nome: sdfsdfsdfsa<br>

E-mail: dfasdf<br>

Telefone: sdfsdf<br><br>

Mensagem: sadf
</body>
</html>"
This content comes in emails body. Why?

In my .php file I have:
"$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $email\n";

$subject = "Contato Site GS Móveis";

if(mail("leonardo@sigmatica.com.br","Contato Site GS Móveis","$msgOk","$headers")){
echo "<script>alert('Mensagem enviada!'); window.location=\"index.php\"</script>";
}else{
echo "<script>alert('Erro ao enviar!'); window.location=\"index.php\"</script>";
}"


I have already set headers, content type and a other things more, but NOTHING WORK!

Is something in php.ini?
I don't know what to do anymore.

I hope you can help me.

Thank you,
Leonardo A.
Reply With Quote
Sponsored Links
  #2  
Old 11th April 2011, 10:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

These links might help:
http://css-tricks.com/sending-nice-html-email-with-php/
http://www.phpbuilder.com/columns/ka...07.php3?page=1
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 13:16
Can not recieve mail with de virtual mail adress Mounir Installation/Configuration 9 25th July 2006 00:16
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 12:47


All times are GMT +2. The time now is 09:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.