PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 26th, 2000, 01:08 PM
Chrille Chrille is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Sweden
Posts: 384 Chrille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 20 h 39 m 54 sec
Reputation Power: 14
Hello All,

Does anybody know how to send an email in html-format? (content-type:text/html)

Regards,
Chrille :-D
Sweden

Reply With Quote
  #2  
Old February 26th, 2000, 03:35 PM
Chrille Chrille is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Sweden
Posts: 384 Chrille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 20 h 39 m 54 sec
Reputation Power: 14
I found the solution myself:

Author: eduardo ()
Date: Sun Oct 03 11:23:39 1999 CDT

You have to specify the correct headers, that's all. In particular, the MIME and content-type ones. Form example:


$headers = "From: me@here.comn";
$headers .= "Reply-To: me@here.comn";
$headers .= "Organization: heren";
$headers .= "MIME-Version: 1.0n";
$headers .= "Content-Type: text/html; charset=iso-8859-1n";
$headers .= "Content-Transfer-Encoding: 8bitn";

$body = "<HTML>n";
$body .= "<BODY>n";
$body .= "<I>Hello</I>n";
$body .= "</BODY>n";
$body .= "</HTML>n";

mail("you@there.com", "Hello", $body, $headers);


Thanks, eduardo!!!

/Chrille

Reply With Quote
  #3  
Old June 17th, 2000, 03:04 PM
tim miller tim miller is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Hillsboro, OR, USA
Posts: 12 tim miller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Chrille:
I found the solution myself:

Author: eduardo ()
Date: Sun Oct 03 11:23:39 1999 CDT

You have to specify the correct headers, that's all. In particular, the MIME and content-type ones. Form example:


$headers = "From: me@here.comn";
$headers .= "Reply-To: me@here.comn";
$headers .= "Organization: heren";
$headers .= "MIME-Version: 1.0n";
$headers .= "Content-Type: text/html; charset=iso-8859-1n";
$headers .= "Content-Transfer-Encoding: 8bitn";

$body = "<HTML>n";
$body .= "<BODY>n";
$body .= "<I>Hello</I>n";
$body .= "</BODY>n";
$body .= "</HTML>n";

mail("you@there.com", "Hello", $body, $headers);


Thanks, eduardo!!!

/Chrille
[/quote]

Hello I read your message since I was having the same problem and it helped. The only problem is when I try certian commands they dont work and I get a php error on the following line.
here is what I typed:
$body .= "<p><fontcolor="#FF3333">tim</font></p>";

Thanks

Tim


Reply With Quote
  #4  
Old June 17th, 2000, 03:27 PM
Chrille Chrille is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Sweden
Posts: 384 Chrille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 20 h 39 m 54 sec
Reputation Power: 14
Hi.

You need to remove or " all ".
Like:

$body .= "<p><fontcolor="#FF3333">tim</font></p>";

Best regards,
Christoffer

Reply With Quote
  #5  
Old June 18th, 2000, 12:35 AM
scoobydoo scoobydoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: Sydney, Australia
Posts: 32 scoobydoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Yeah, use the addslashes function.. it helps when you have lots of slashes to add..

addslashes()

scoobydoo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > HTML-emails

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap