Hello,
 
I have a script that generates a pdf file from html.
 
It generates it for viewing perfect.
It will email it also.
 
However when I email it a .dat extension is added and it won;t work in Acrobat.
 
If I view the source of the view version and viwe the source of the dat file they seem 
to be identicle.
The html is generated on the fly based on databads enetries and then the pdf code is 
created form that using the program
htmldoc.
 
If I just remove the extension so it's a .pdf file Acrobat still can't read it.
 
Is there any way to specify what the attached file name should be with out it adding 
the .dat ?
What am I missing?
 
Thanks
Dan 
 
Here is my code :
 
# works great
       print "Content-type: application/pdf\n\n";
        print $contract_html_pdf;
        exit;
 
# works good except for it sends 'Infiniplex.pdf.dat' instead of Infiniplex.pdf
 
           $sender = new Mail::Sender {smtp => "$smtp_serv", from => "$from"};
                $sender->OpenMultipart({subject => "$subject", to => "$email_to"});
                $sender->Body({
                        ctype => 'text/plain',
                        msg => "$text"
                });
                $sender->Part({
                        ctype => 'application/pdf',
                        description => 'Infiniplex.pdf',
                        disposition => 'attachment',
                        msg => "$contract_html_pdf"
                });
                $sender->Close();
 
 
 


Reply via email to