Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

RTF corrupted when sent to email

by ikkon (Monk)
on Apr 05, 2007 at 18:45 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (None)
    As of 2024-04-25 01:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found