Jump to content

how to attach images with mail


shane07

Recommended Posts

Hello to all.

I have built a newsletter section which would contains images as the content.

I don't know how to attach the images on the fly with the mail.

I used following code to send mail:

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$fromname."<".$fromaddress.">"."\r\n".
                "To:".$rs['subscriber_email']."\r\n"; 
if(@mail($rs['subscriber_email'],$mail_subject,$mail_body,$headers)){							
$msg.="Newsletter has been successfully sent to ".$rs['subscriber_email']."<BR>";						
}						
else{
$nmsg.="Newsletter has been failed to sent to ".$rs['subscriber_email']."<BR>";					
}

Waiting for the reply.

Link to comment
https://forums.phpfreaks.com/topic/108347-how-to-attach-images-with-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.