MAIL() Trouble. Need your eyes.
| From: | Shane | Date: | Thu, 11 Jul 2002 18:21:42 +0000 |
| Subject: | MAIL() Trouble. Need your eyes. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107200@lists.php.net to get a copy of this message | ||
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
-----------------------------------------
<?PHP
$myname = "Me Myself";
$myemail = "me@here.com";
$myreplyemail = "me@here.com";
$contactname = "Mister Contact";
$contactemail = "me@here.com";
-----------------------------------
MY VERY LONG $MESSAGE STRING
-----------------------------------
$message = "<html><head><title></title>";
$message.= "<meta http-equiv='Content-Type' content='text/html;
charset=iso-8859-1'></head>";
$message.= "<body bgcolor='#54616E' text='#FFFFFF'
link='#FF6600' vlink='#999999' alink='#FF9900'>";
$message.= "<center><table width='501' border='0'
cellspacing='0' cellpadding='0'><tr><td width='500'
background='http://www.delaplaine.net/flashmail/noflash.gif'>";
------------------------------
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
------------------------------
//$message.= "<p><object
classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'
width='500' height='300'><param name=movie value='http://www.delaplaine.net/flashmail/delaplaine.swf'><param
name=quality value=high><param name=menu value=false><param name='BGCOLOR'
value='#54616E'>";
//$message.= "<embed src='http://www.delaplaine.net/flashmail/delaplaine.swf'
quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'
type='application/x-shockwave-flash' width='500' height='300'
bgcolor='#54616E'></embed>";
//$message.= "</object></p>";
------------------------------
HERE IS WHERE THE TROUBLE ENDS
------------------------------
$message.= "</td>";
$message.= "<td bgcolor='#54616E'><img src='http://www.delaplaine.net/flashmail/spacer.gif'
width='1' height='300'></td></tr>";
$message.= "<tr><td
align='center'><p><br></p><p><font face='Verdana,
Arial, Helvetica, sans-serif' size='1'><a href='http://www.delaplaine.net/extranet/fm.php?sec=new&id=noflash'>Click
here</a> if you cannot see the animation above.</font></p><p><font
face='Verdana, Arial, Helvetica, sans-serif' size='1'
color='#999999'>© Copyright 2002, Delaplaine Creative.<br> All rights
reserved.</font></p></td><td
align='center'> </td></tr>";
$message.= "</table><p> </p></center>";
$message.= "</body></html>";
$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);
?>