The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
HTML-emails
Discuss HTML-emails in the PHP Development forum on Dev Shed. HTML-emails PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 26th, 2000, 01:08 PM
|
|
Contributing User
|
|
Join Date: Jan 2000
Location: Sweden
Posts: 384
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
|

February 26th, 2000, 03:35 PM
|
|
Contributing User
|
|
Join Date: Jan 2000
Location: Sweden
Posts: 384
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
|

June 17th, 2000, 03:04 PM
|
|
Junior Member
|
|
Join Date: Jan 2000
Location: Hillsboro, OR, USA
Posts: 12
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
|

June 17th, 2000, 03:27 PM
|
|
Contributing User
|
|
Join Date: Jan 2000
Location: Sweden
Posts: 384
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
|

June 18th, 2000, 12:35 AM
|
|
Contributing User
|
|
Join Date: Jun 2000
Location: Sydney, Australia
Posts: 32
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|