Here's the code:
<?php
...
$handle = fopen ("http://www.healthservicesinc.com/respondLink.htm", "r");
while (!feof ($handle)) {
$buffer = fgets($handle, 4096);
$reply .= $buffer;
}
fclose ($handle);
mail("$email", "Link Exchange from HSI", $reply, "From: hsinc@healthservicesinc.com"); } ?>
What I'm trying to accomplish is to send an html file as an email message to anyone who fills out the form. The problem is that the email message they receive is in pure text meaning the <html>, <body>, <p> tags show up in the email message and not as regular html. I am testing it on a few of my email accounts so I know they can display email as html. Any suggestions or if someone could point me in the right direction I would appreciate. The entire file is in the email message but it just doesn't display as a html file which is what I want.
Note: I just found this forum today and am very impressed by the site and its users, they seem very helpful and friendly as I was looking around for a similar post on this subject before.
Thanks,
JC
Sending a html file
Moderators: egami, macek, gesf
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
dont forget about headers for leter!
php.net/mail
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
[/img]
php.net/mail
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
[/img]
I knew of php.net but misunderstood the reason for the headers. Thanks for the assist.
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
look at content type it tells what type of file you send.