php mail attachment sending an attachment with php

sending an email with php is easy, an attachment is a bit harder, but possible. here are somethings you will need from the video

(note, just some of the things)
$content = chunk_split(base64_encode(file_get_contents($file)));
$header .= "content-type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
$header .= "content-transfer-encoding: base64\r\n";
$header .= "content-disposition: attachment; filename=\"".$file_name."\"\r\n\r\n";
$header .= "content-type:text/plain; charset=iso-8859-1\r\n";
$header .= "content-transfer-encoding: 7bit\r\n\r\n";


fast video

php mail attachment sending an attachment with php