PDA

View Full Version : sending swf in email



hrnyc
February 8th, 2005, 02:15 PM
hi guys.
I want to send a HTML email via PHP that contains swf(flash) content.
But when I send it and receive it by the email client (outlook / thunderbird)
i can't see the swf but client shows the text part:"hello there..."

This is the PHP code which sends email:
"mailsend.php"
-------------------------------------------------------------------------
<?php
$root="http://www.mywebsite.com/dnm/";
$url=$root."pattern.php";

$eposta="auser@adomain.com";
$dosya=file("$url");
$mesaj=join("",$dosya);
mail ($eposta,'mailinf subject', $mesaj,"From: youradmin <noreply@mywebsite.com>\nMIME-Version: 1.0\nContent-Type:text/html ; charset=iso-8859-9\n");

echo "mail has been sent...";

?>
------------------------------------------------------------------------


and this is my HTML code. I attach this to my email.
"pattern.php"
-------------------------------------------------------------------------<html>
<head>
<style type="text/css">
<!--
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-style: italic;
}
-->
</style>
</head>
<body>
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="75">
<param name="movie" value="http://www.mywebsite.com/dnm/hrnyc_1.swf">
<param name="quality" value="high">
<embed src="http://www.mywebsite.com/dnm/hrnyc_1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="75"></embed>
</object>
</p>
<p class="style2">hello there...</p>
</body>
</html>
--------------------------------------------------------------------------

Thanks. :)

Hans Kilian
February 9th, 2005, 01:56 AM
I've also tried experimenting with embedding Flash content in HTML emails, but I've given up. The mail clients I've tried it on 'sanitizes' the HTML for security reasons and then the Flash movie doesn't show up.

I ended up using an animated GIF instead, since the movie was relatively simple. But it took up 10 times as much space...

JustJeff
February 9th, 2005, 09:59 PM
No modern mail client will display swfs by default - it requires a third party activex control which is a security hazard.

Some people may be dumb and change the default, but the vast majority will never see a swf unless they manually change the settings.