hello everyone ..

I have to create a newsletter using php .... now one problem is that .. i have to send the output of one php page through the mail .

now .. when i designed the newsletter i want to include some logo or image in the newsletter . I used style in the page itself .. which works fine ... but it is not working for the images ...


how to solve this problem ........
thanks ...

You can include the images as a link to the website (which is easiest if the images are online already). Like this:

<img src="http://www.example.com/images/myimage.jpg" />

Another option could be to create a multipart email, but I'm not familiar enough to give an example. Probably someone else can give you an example of this (or search for it).

ok i will try ur options ......
thnks 4 the feedback ...........

Hi this is nathen i think this is some what usefull to you,

$query="select email from cfair_adminusers order by admin_id";
		$var=mysql_query($query);
		while($arrayemail=mysql_fetch_array($var))
		 {
			$emailid=$arrayemail['email'];
			$to = $emailid;
			$subject = $subject ;
			$message=$message;
		   if($_FILES['filename']!='')
		   {
			   $tmp_name = $_FILES['filename']['tmp_name'];
			   $type = $_FILES['filename']['type'];
			   $name = $_FILES['filename']['name'];
			   $size = $_FILES['filename']['size'];
		  	  if(file_exists($tmp_name))
			   {
				    
				     if(is_uploaded_file($tmp_name))
					 {
			
						 $file = fopen($tmp_name,'rb');
				    	 $data = fread($file,filesize($tmp_name));
						 fclose($file);
				 		 $data = chunk_split(base64_encode($data));
					 }
			   } 
		   }
	 
	       $headers .= 'From:superadmin@yyyy.com' . "\r\n" .
			"MIME-Version: 1.0\r\n" .
			 "Content-Type: multipart/mixed;\r\n" .
			 " boundary=\"{$mime_boundary}\"";
		   $headers .= 'Bcc: [email]admin@yyyy.com[/email]' . "\r\n";
			'Reply-To: [email]www@company.com[/email]' . "\r\n" .
			'X-Mailer: PHP/' . phpversion();
			if(@mail($to, $subject, $message, $headers))
			{   
				 echo "Message Sent";
				 header("location:send_newsletter.php");
			}
			else
			{
			echo "Mail Not Sent";
			}
			
	    }//while
This article has been dead for over six months. Start a new discussion instead.