Hi
First I apologies for not posting my code that I need help with.
I'm trying to send a PDF attachment via the mail function.
I'm able to send the attachment, but when it gets to the other end the attachment is not a PDF document.
Looks llike a PDF document, but Adobe can't read it.
Here my code:
$to = 'regagnon@psc-cfp.gc.ca';
$subject = 'Test email with attachment';
$random_hash = md5(date('r', time()));
$headers = "From: regagnon@psc-cfp.gc.ca\r\nReply-To: regagnon@psc-cfp.gc.ca";
$headers .= "\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-".$random_hash."\"";
$attachment = chunk_split(base64_encode(file_get_contents('taghred.pdf')));
What am I missing?
Thanks
Cheers
Ren