0

Hi All,

Im in the middle of making a dynamic multi part email and have come accross a snag.

The function receives a file, and depending on the content of that file it then processes the relevant headers and mixed parts, however, rather than echoing the items i need to put them into variables.

there are two examples below, 1 being plain text, the other is the same but in a variable. If I call the variable it will not attach. Only when I use the plain text it will attach.

Can anybody see the difference


Plain text

Content-Type: application/<?php echo $filetype;?>; name="<?php echo $filename; ?>" 
Content-Transfer-Encoding: base64 
Content-Disposition: attachment

the variables

$attachment_header = "Content-Type: application/" . $filetype . "; name=\"" . $filename . "\"\r\n ";
$attachment_header .= "Content-Transfer-Encoding: base64 Content-Disposition: attachment";
echo $attachment_header;
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by whiteyoh
0

on this occasion ill accept the prize of todays biggest loser. i was missing the \r\n

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.