Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RTF corrupted when sent to email

by ikkon (Monk)
on Apr 05, 2007 at 18:45 UTC ( #608528=perlquestion: print w/ replies, xml ) Need Help??
ikkon has asked for the wisdom of the Perl Monks concerning the following question:

I have a script that pulls from a database and creates a pdf or rtf based on the users input, the pdf works fine and emails fine, then if they want a rtf it creates it just fine but when sent in email using MIME::Lite it gives me a error: the document name or path is not valid. Try these suggestions. *Check file permissions for the document or drive *Use the File Open dialog box to locate the document I have no Idea what is causing this issue this is the code I am using its kinda long UPDATE: ok I fixed it, the RTF:: Writer module has a faulty close function so I re-wrote the function:
sub RTF::Writer::close { return unless $_[0][2]; # Already closed?! #DEBUG > 1 and print "Closing $_[0]\n"; $_[0]->print(\$_[0][1]) if length $_[0][1]; $_[0][2]->close(); # Call close directly undef $_[0][2]; # ...presumably clausing any FH to close and dest +roy. $_[0][1] = ''; return; }
this solved the problem thanks for the help

Comment on RTF corrupted when sent to email
Download Code
Re: RTF corrupted when sent to email
by ikkon (Monk) on Apr 05, 2007 at 19:09 UTC
    this has been updated and fixed , guess I posted premeturly

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://608528]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-07-14 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (261 votes), past polls