I know this is a simple way to send HTML Email.

<?php
$to = "johndoe@fakedomain.com";
$from = "janedoe@anotherfakedomain.com";
$subject = "This is a test email";
$message = <<<EOF
<html>
<body bgcolor="#ffffff">
<p align="center">
<b>Hello World!</b>
</p>
</body>
</html>
EOF;

$headers  = "From: $from\r\n"; 
$headers .= "Content-type: text/html\r\n"; 

$success = mail($to, $subject, $message, $headers); 
if ($success) 
    echo "The email to $to from $from was successfully sent"; 
else 
    echo "An error occurred when sending the email to $to from $from"; 

?>

but I also want to send HTML email,and the HTML file also have jpg images and flash swf file.I confuse how to add links in the HTML eamil for them.do I have to attch all the images with the Email or only add some links on HTML mesage.

Please give me a idea about it.Thanks

    How about flash swf file. how to do the link with flash file.

    Thanks

      something like this

      <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="550" height="300">
                <param name="movie" value="introjm.swf">
                <param name="quality" value="high">
                <embed src="introjm.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="300"></embed></object>
      

      although, i'm not entirely sure you can use swf's in email, never tried or paid attention enough

        hi stolzyboy,

        but introjm.swf is a local file.do I have to attach it with email also.

        Thanks

          <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="300">
          <param name="movie" value="introjm.swf">
          <param name="quality" value="high">
          <embed src="introjm.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="300"></embed></object>

          Do I have to change two "introjm.swf" with full path?

          Thanks

            well yes... and to the name of YOUR file, etc...

              Write a Reply...