Billy T
07-20-2003, 01:04 AM
Hey all
I thought this would be easy and I've found a wealth of information on the subject but I just can't get it to work. I receive the email and there is a pdf file attached but its 1k and is corrupt (down the bottom of the email there is a broken image icon)
here's my code
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"XX-1234DED00099A\";\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: $adminaddress\r\n";
//This sends a confirmation to your visitor
$confirmMessage="This is a MIME Encoded Message
--XX-1234DED00099A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
html formatted text message goes here
--XX-1234DED00099A
Content-Type: application/octet-stream;
name=subscription_payment.pdf\r\n
Content-Transfer-Encoding: base64\r\n
Content-Description: \"Subscription payment form\"\r\n
Content-Disposition: Attachment; subscription_payment.pdf\r\n
--XX-1234DED00099A-";
mail("$email","Welcome to blah blah",
$confirmMessage,$headers);
can anyone see what I'm doing wrong?
Thanks
I thought this would be easy and I've found a wealth of information on the subject but I just can't get it to work. I receive the email and there is a pdf file attached but its 1k and is corrupt (down the bottom of the email there is a broken image icon)
here's my code
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"XX-1234DED00099A\";\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: $adminaddress\r\n";
//This sends a confirmation to your visitor
$confirmMessage="This is a MIME Encoded Message
--XX-1234DED00099A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
html formatted text message goes here
--XX-1234DED00099A
Content-Type: application/octet-stream;
name=subscription_payment.pdf\r\n
Content-Transfer-Encoding: base64\r\n
Content-Description: \"Subscription payment form\"\r\n
Content-Disposition: Attachment; subscription_payment.pdf\r\n
--XX-1234DED00099A-";
mail("$email","Welcome to blah blah",
$confirmMessage,$headers);
can anyone see what I'm doing wrong?
Thanks