Hi, I have to send out an email with an attachment using the php mail() function. I have been able to script the mailing using only txt/html. $to = $emailaddress; $subject = "Confirmation of message receipt"; $message = $NewBody; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; // More headers $headers .= 'From: webmaster <validemaill@domain.com>' . "\r\n"; mail($to,$subject,$message,$headers); PHP: $Newbody is a string (html formatted). I have the file path in another string.. $filepath Can somebody out there please help me accomplish this small task? I require the html formatting as well as the file to be attached with the email. Talker.
Thanks, i guess its hard to accomplish my requirements with the normal php mail function. I will take a look at phpmailer.