Tilføjelse af attachment i simpelt mailscript
Jeg vil gerne have monteret en attachment til dette mail script - kan i hjælpe?Filen er en PDF som ligger på egen server. MIME-klassen er jeg kommet frem til skal være: application/pdf (ell. text/pdf ??)
--- KODE ----------------------------------------------->
$subj = $subject;
$header = "From: ".$from."\r\n";
$header .= "Reply-To: ".$reply_to."\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: Multipart/Alternative; boundary=\"part boundary\"";
$body = "--part boundary\r\n";
$body .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
$body .= "\r\n" . $txt . "\r\n";
$body .= "\r\n--part boundary\r\n";
$body .= "Content-Type: text/html\r\n";
$body .= "\r\n" . $htm . "\r\n";
$body .= "\r\n--part boundary--\r\n";
$subject = $subj;
mail($to, $subject, $body, $header);
<--- KODE -----------------------------------------------
