User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,602 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,483 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1031 | Replies: 13
Reply
Join Date: Jun 2007
Posts: 71
Reputation: Pro2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pro2000's Avatar
Pro2000 Pro2000 is offline Offline
Junior Poster in Training

Question HTML In Mail

  #1  
Sep 10th, 2007
Peace, I made a mail form and I want to enable The HTML in the Mail Message, How can I do it?... I wrote in the headers:
$headers='From:Management<info@3malas.com>';
The great scientist see his web-site:
http://www.elnaggarzr.com/en
I'm sure that will be good for you!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Solution Re: HTML In Mail

  #2  
Sep 10th, 2007
try this:

<?php
$subject = "HTML Test";
$header = "MIME-Version: 1.0\n";
$header .= "Content-type: text/html; charset=iso-8859-1\n";
$header .= "From: CodeRewind <service@coderewind.com>\r\n";
$to = "Abd_arrahman2000@yahoo.com";
$body = "";
$body = $body.'<b>Test HTML Mail</b>';

mail($to, $subject, $body, $header);
?>
Last edited by binoj_daniel : Sep 10th, 2007 at 4:30 pm.
Reply With Quote  
Join Date: Jun 2007
Posts: 71
Reputation: Pro2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pro2000's Avatar
Pro2000 Pro2000 is offline Offline
Junior Poster in Training

Re: HTML In Mail

  #3  
Sep 11th, 2007
I will must try it... Thanks.
The great scientist see his web-site:
http://www.elnaggarzr.com/en
I'm sure that will be good for you!
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: HTML In Mail

  #4  
Sep 11th, 2007
Let me know.
Reply With Quote  
Join Date: Jun 2007
Posts: 71
Reputation: Pro2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pro2000's Avatar
Pro2000 Pro2000 is offline Offline
Junior Poster in Training

Re: HTML In Mail

  #5  
Sep 12th, 2007
It did not work, Another question why should I write \n and \r?
The great scientist see his web-site:
http://www.elnaggarzr.com/en
I'm sure that will be good for you!
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: HTML In Mail

  #6  
Sep 12th, 2007
What is the error?

\n is for New line
Reply With Quote  
Join Date: Jun 2007
Posts: 71
Reputation: Pro2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pro2000's Avatar
Pro2000 Pro2000 is offline Offline
Junior Poster in Training

Re: HTML In Mail

  #7  
Sep 13th, 2007
In fact there is no error, It goes well but the Email doesn't send.
This is the Code:


$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=windows-1256\n";
$headers .="From:3Malas Chat Managment<info@3malas.com>\n\r";
$Going="info@3malas.com";
$Subj="Hello";
$Msg="Bla bla bla bla..............";
mail($Going,$Subj,$Msg,$headers);
The great scientist see his web-site:
http://www.elnaggarzr.com/en
I'm sure that will be good for you!
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: HTML In Mail

  #8  
Sep 13th, 2007
try sending the mail to a different email address.
Reply With Quote  
Join Date: Jun 2007
Posts: 71
Reputation: Pro2000 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pro2000's Avatar
Pro2000 Pro2000 is offline Offline
Junior Poster in Training

Question Re: HTML In Mail

  #9  
Sep 14th, 2007
Peace,
It tried it and it worked but The Sender Name was:
anymous@(MYCPNAME).com
However I want the (From) Shows: 3Malas Chat Room Management <info@3malas.com>
How can I do it?
The great scientist see his web-site:
http://www.elnaggarzr.com/en
I'm sure that will be good for you!
Reply With Quote  
Join Date: Dec 2006
Location: United States
Posts: 613
Reputation: binoj_daniel is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: HTML In Mail

  #10  
Sep 14th, 2007
So you replaced both the variable with anymous@(MYCPNAME).com . The header and the going?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:05 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC