freelanceprogrammers.org Forum Index » PHP

Php Mail


View user's profile Post To page top
anuradika80 Posted: Thu Apr 07, 2005 5:04 pm


Joined: 24 Feb 2005

Posts: 17
Php Mail
Hi guys, I have been seding mail using php with html format. It works
fine in my office IIS server, but when i upload it to the web server,
it doesnt seem to be sending a HTML format mail, but rather the html
code itself.

$headers = "MIME-Version: 1.0 ";
$headers .= "Content-type: text/html; charset=iso-8859-1 ";
$txt_Msg = "<LINK href=`http://www.hotmail.com/include/styles.css`
type=text/css rel=stylesheet>";
$txt_Msg = $txt_Msg . "<body topmargin=3 bottommargin=3 leftmargin=0
rightmargin=0>";
$txt_Msg = $txt_Msg . "<table width=`600` border=`0` align=`center`
cellpadding=`0` cellspacing=`0`>";

so when i display the $txt_Msg, it works well, as in the table is
shown nicely, when in the mail, the code is being displayed instead of
the GUI.
Please help
Reply with quote
Send private message
View user's profile Post To page top
strongkill Posted: Fri Apr 08, 2005 6:00 am


Joined: 08 Apr 2005

Posts: 2
Php Mail
have a try this.
<?php
$headers = "MIME-Version: 1.0
";
$headers .= "Content-type: text/html; charset=BIG5
";
//$to = "yongqiang.yuan@..." . ", " ; // note the comma
$to .= "strongkill@...";
$subject = "html";

$fp=fopen("http://www.strongd.net/newlatter/mail.html",r);
while (!feof($fp)) {
$str.=fread($fp,1024);
}
fclose($fp);
mail($to,$subject,$str,$headers);
?>


--- In php-objects@yahoogroups.com, "Anuradika" <anuradika80@y...>
wrote:
>
> Hi guys, I have been seding mail using php with html format. It
works
> fine in my office IIS server, but when i upload it to the web
server,
> it doesnt seem to be sending a HTML format mail, but rather the
html
> code itself.
>
> $headers = "MIME-Version: 1.0 ";
> $headers .= "Content-type: text/html; charset=iso-8859-1 ";
> $txt_Msg = "<LINK href=`http://www.hotmail.com/include/styles.css`
> type=text/css rel=stylesheet>";
> $txt_Msg = $txt_Msg . "<body topmargin=3 bottommargin=3
leftmargin=0
> rightmargin=0>";
> $txt_Msg = $txt_Msg . "<table width=`600` border=`0` align=`center`
> cellpadding=`0` cellspacing=`0`>";
>
> so when i display the $txt_Msg, it works well, as in the table is
> shown nicely, when in the mail, the code is being displayed instead
of
> the GUI.
> Please help
Reply with quote
Send private message
View user's profile Post To page top
JBennett@... Posted: Fri Apr 08, 2005 7:53 pm


Joined: 08 Apr 2005

Posts: 10
Php Mail
I notice you use as your end-of-line but I think you want
or

as in strongkill`s reply.

Take a look at the headers of the received email from the web server
compared to those from your local server. You`` probably notice that
they are malformed - maybe all on one line or something like that.

Good luck.

-jmb

Anuradika wrote:

>Hi guys, I have been seding mail using php with html format. It works
>fine in my office IIS server, but when i upload it to the web server,
>it doesnt seem to be sending a HTML format mail, but rather the html
>code itself.
>
>$headers = "MIME-Version: 1.0 ";
>$headers .= "Content-type: text/html; charset=iso-8859-1 ";
>$txt_Msg = "<LINK href=`http://www.hotmail.com/include/styles.css`
>type=text/css rel=stylesheet>";
>$txt_Msg = $txt_Msg . "<body topmargin=3 bottommargin=3 leftmargin=0
>rightmargin=0>";
>$txt_Msg = $txt_Msg . "<table width=`600` border=`0` align=`center`
>cellpadding=`0` cellspacing=`0`>";
>
>so when i display the $txt_Msg, it works well, as in the table is
>shown nicely, when in the mail, the code is being displayed instead of
>the GUI.
>Please help
>
>
>
>
>
>PHP Data object relational mapping generator - http://www.meta-language.net/
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help