Re: headers help

[email protected] (Nathan Rixham)
Newsgroups php.general
Message-ID <[email protected]>
MEM wrote:
> Hello all,
> 
> I must confess I know the very basics on this language and have even less
> knowledge about http headers. I wish you could help me out on this:

mime headers not http :)

> I have a form that sends html e-mails and an optional file as attachment.
> The issue is that, if the file is NOT send, the e-mail receives two times
> the same content, one that gets read by the mail clients as HTML properly,
> and, a literal print of my $message string variable that contains:
> 
> <html>
>   <head>
>   </head>
>   <boby>
>     <table>My form contents</table>
>   </body>
> </html>
> 
> 
> I believe that the reason for this lies on the $header options, probably on
> line number 8 ?
> 
> Here is the, what I believe, is the relevant code:
> 
> http://pastebin.com/5ywdK0UU

I've had a quick look and this: http://pastebin.com/RswEBPLd may work;
if not though you want to view the source of an email from anywhere
which displays correctly; and the source of one from your application -
then compare to get the fix :)

Regards!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.