Thanks a lot. That WAS the problem!
I have one more question:
In the following piece of code:
$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$message . "\n\n";
$message .="This is an automated email sent from a php script\n";
// Base64 encode the file data
$data = chunk_split(base64_encode($data));
// Add file attachment to the message
$message .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n" .
//"Content-Disposition: attachment;\n" .
//" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n" .
"--{$mime_boundary}--\n";
if I leave the message "This is an automated email sent from a PHP script" as is, then I get the email with the attachment "attaced", but I can't get the line breaks to work. However, if I put any html tags in the message, to ensure proper line breaks, then the attachment gets "included" and not attached.
Is there a way to get around this?