View Single Post
  #2  
Old 09-19-2003, 06:22 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Code:
// attachments if($AttmFiles){ foreach($AttmFiles as $AttmFile){ $patharray = explode ("/", $AttmFile); $FileName=$patharray[count($patharray)-1]; $Msg.= "\n--".$OB."\n"; $Msg.="Content-Type: application/octetstream;\n\tname=\"".$FileName."\"\n"; $Msg.="Content-Transfer-Encoding: base64\n"; $Msg.="Content-Disposition: attachment;\n\tfilename=\"".$FileName."\"\n\n"; //file goes here $fd=fopen ($AttmFile, "r"); $FileContent=fread($fd,filesize($AttmFile)); fclose ($fd); $FileContent=chunk_split(base64_encode($FileContent)); $Msg.=$FileContent; $Msg.="\n\n"; } }

The files are attached by an array specified.
$attmFile = Array("/home/sites/blah.com/attachment.jpg");

Found this on www.php.net/mail, sure it could be integrated into include/func.php for what's needed to attach files to the email's sent.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote