Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 the shadows deepen...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2018-01-21 01:16 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.