If you're running your scripts on a UNIX box you could also use uuencode.

This is not as tidy as using MIME but also works.

For example:

open (MAIL,"| uuencode $attachment_file_name | mail email@address");
<mailto:email@address> 
 
print MAIL "whatever you think the attachment should contain";

close MAIL;

Regards,

Carlos


-----Original Message-----
From:   Jon Scarbrough [mailto:[EMAIL PROTECTED]]
Sent:   25/02/00 16:39
To:     Mueller, Juergen (pro.vider GmbH iG)
Cc:     '[EMAIL PROTECTED]'
Subject:        Re: attaching a document

Use the MIME-tools-4.124 module + dependencies. It makes it a breeze to
attach
documents.

Jon

"Mueller, Juergen (pro.vider GmbH iG)" wrote:

> Hello,
>
> I'm not quite sure if this is the right list for my question, anyway...
;-)
>
> If one wants to generate an email, the perl-code surely looks something
like
> that:
>
>   open(MAIL,"|$mailprog -t");
>
>   print MAIL "To: info\@host.de\n";
>   print MAIL "From: $input{'absender'}\n";
>   print MAIL "Subject: Hallo Juergen\n\n";
>   print MAIL "\n";
>   print MAIL "Text der Email\n";
>   print MAIL "blabla ...\n\n";
>
>   close (MAIL);
>
> Questions:
> What is the code to attache a document to such a script-generated email?
>
> Thanks a lot.
>
> Juergen

Reply via email to