in reply to RE: RE: RE: RE: Re: Print to a printer
in thread Print to a printer

I have a question regarding attachments. Will you be able to answer it to me. Thanks How can you send attachments to email. I used sendmail to send emails. I was trying to use MIME::Lite to send attachments but it is giving me an error when i use the attach().
  • Comment on RE: RE: RE: RE: RE: Re: Print to a printer

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: RE: Re: Print to a printer
by arturo (Vicar) on Nov 02, 2000 at 04:59 UTC

    What's the error?

    Also, see Re: Mail attachments and its containing thread, and see if that helps.

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

      my question is that in type how would you know what the attachment file is. Meaning i have a attaachment button that attaches a file then i click send email. SO i am confused about how to give the type. Also, in the path can i give the whole path plus the filename. Or do i need to parse it. # Create a new single-part message, to send a GIF file: $msg = new MIME::Lite From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'Helloooooo, nurse!', Type =>'image/gif', Encoding =>'base64', Path =>'hellonurse.gif'; # Send in the "best" way # (the default is to use "sendmail"): $msg->send; I am sorry i maybe asking very basic quesitons. Its just I am learning perl and i am just a beginner.
        Please read the Site How To about how to mark up posts to make them more readable (especially code). As to the question: determining MIME-type is not a specifically a perl issue, and sometimes it's a no-brainer (image/gif, e.g. is obviously the mime-type for .gif files. And once you learn the template, you can figure out all sorts of them.) But so much for that -- you want a solution! actually, There is a Perl module (File::MMagic) that can help you. Again, in the spirit of showing you how to fish, I'll point you to Re: Opinions on determining mime type and its attendant thread.

        Philosophy can be made out of anything. Or less -- Jerry A. Fodor