Re: [PHP] Re: MAIL() Trouble. Need your eyes.
On Thu, Jul 11, 2002 at 07:00:57PM -0400, Chris Earle wrote: > - > $myname = "Me Myself"; > $myemail = "[EMAIL PROTECTED]"; > $myreplyemail = "[EMAIL PROTECTED]"; > $contactname = "Mister Contact"; > $contactemail = "[EMAIL PROTECTED]"; That's ok... > --- > MY VERY LONG $MESSAGE STRING > --- > $message = ""; That's not how MIME based email bodies start. > //$message.= " classid='clsid:D27CDB6E-AE6D-11cf-96B8-44455354' > codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca > b#version=5,0,0,0' width='500' height='300'> value='http://www.delaplaine.net/flashmail/delaplaine.swf'> name=quality value=high> value='#54616E'>"; This will give an error, because the message is not defined as a propper MIME type. I'm not 100% sure of the exact correct syntax of MIME based email now, but a look at the RFCs. A nice quick hack to get the propper syntax, send yourself a HTML based email from OE or a similar mail client, and view the source of the generated email message. You need things like --- message type="mime/type" type="application/x-shockwave --- --- next part="lbahb lah" --- etc etc etc. So yes, you're problem is that your email's not properly formated. Search arround a bit, read some fine manuals, and make some examples of MIME based email messages from clients that you know works properly (such as OE). Then, go back, format your message body properly, and it should all work very nicely -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MAIL() Trouble. Need your eyes.
What's the error message? "Shane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Greetings, I am attempting to send an HTML based email using the Mail() function in PHP. I am having great luck until I include an OBJECT or EMBED tag in the HTML string. I am running PHP 4.2.1 on a WIN NT client. If I uncomment the OBJECT or EMBED lines below in the $message variable, my script errors out on the MAIL() call at the bottom. Please, any help would be appreciated. Thanks folks! - NorthBayShane - "; $message.= ""; $message.= ""; $message.= ""; -- HERE IS WHERE THE TROUBLE STARTS IF I UNCOMMENT THE OBJECT OR EMBED TAG THE SERVER ERRORS OUT ON MY MAIL() CALL -- //$message.= ""; //$message.= ""; //$message.= ""; -- HERE IS WHERE THE TROUBLE ENDS -- $message.= ""; $message.= ""; $message.= "Click here if you cannot see the animation above.© Copyright 2002, Delaplaine Creative. All rights reserved. "; $message.= " "; $message.= ""; $subject = "FlashMail Test"; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: ".$myname."<".$myemail.">\r\n"; $headers.= "To: ".$contactname."<".$contactemail.">\r\n"; $headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n"; $headers.= "X-Priority: 1\r\n"; $headers.= "X-MSMail-Priority: High\r\n"; $headers.= "X-Mailer: Just My Server"; mail($contactemail, $subject, $message, $headers); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php