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

Am trying to write a program to send an email with attachment and some message in the body of the email. I can do it either one at a time. i.e, by using the function IRI::Mail::File($props) i can send attachement but i cant write anything in the body of the email. on the other hand i can write something in the email using IRI::Mail::Text this function. but cant send an attachment with it. please note am using very basic version of perl.. please advise.
  • Comment on Sending an Email with attachment and body of the email using perl

Replies are listed 'Best First'.
Re: Sending an Email with attachment and body of the email using perl
by daxim (Curate) on Aug 27, 2013 at 09:47 UTC
    Perlmonks generally cannot help with proprietary software. Replace the email generation with a decently working MIME package such as Courriel::Builder.
Re: Sending an Email with attachment and body of the email using perl
by bitingduck (Deacon) on Aug 27, 2013 at 11:52 UTC
    MIME::Lite is pretty easy to use- you should be able to assemble a multi-part email with attachments just from cut and paste from the included docs.
Re: Sending an Email with attachment and body of the email using perl
by McA (Priest) on Aug 27, 2013 at 12:10 UTC
Re: Sending an Email with attachment and body of the email using perl
by hippo (Archbishop) on Aug 27, 2013 at 17:05 UTC

    The relevant FAQ recommends Email::MIME so you might want to look at that too.