ciaran has asked for the wisdom of the Perl Monks concerning the following question:

Hello,
I am trying to send an email with a rtf attachment using Mail::SendEasy. However, when I look into the attachment it doesn't contain any text, but does when I send a .txt, or .doc. I have isolated it down to Mail::SendEasy and am running out of ideas. Obviously when view it on the OS where it was created it looks fine. Here's the section of the code:
use Mail::SendEasy; use RTF::Writer; my $rtf = RTF::Writer->new_to_file("greetings.rtf"); $rtf->prolog( 'title' => "Greetings, hyoomon" ); $rtf->number_pages; $rtf->paragraph( \'\fs40\b\i', # 20pt, bold, italic "Hi there!" ); $rtf->close; my $status=Mail::SendEasy::send( from => 'sender@company.com', to => 'receiver@company.com', subject => "Morning Report", anex => "greetings.rtf");
Thanks,
Ciarán

Replies are listed 'Best First'.
Re: RTF Attachments with Mail::SendEasy
by Anonymous Monk on Oct 21, 2005 at 14:05 UTC
    Is the file corrupted when it arrives?
      Hello,
      How can I find that out? There's simply no text in there? But when I use am mail client to send it to the exact same email address it works fine!
      Ciaran