Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://608528]
Approved by planetscape
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-10-22 05:14 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (272 votes). Check out past polls.