shane07 Posted June 2, 2008 Share Posted June 2, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.