🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.perl
Article #9

HELP !!! Attachment with sendmail (Perl under linux)

#9
From: T. de Konink
Date: Sun, 28 Dec 1997 00:00
30 lines
1718 bytes
Hi,

I want a file from an server (linux) sended to me automaticly by mail.
Therefore I want to
make a Perl-script that uses "sendmail", to send me the file. But I
don't know how to
attach a file whitin the mail using sendmail.

QUESTION :
How can I attach a file to a mail-message using a Perl script under
linux. I know how to
send a mail (see below), but I don't know how to attatch an file. If you
know how to do
it, I would be glad to hear from you.

Thanks in advance,

Thomas de Konink
mailto:tkonink@horizon.nl

PS: As far as I am:

  open(MAIL, "|/usr/lib/sendmail tkonink@horizon.nl");
  print MAIL "Reply-to: $in{'email'} ($in{'naam'})\n";
  print MAIL "Subject: Aanmelding Email Lijst\n";
  print MAIL "Datum   : $date1  Tijd: $time1 \n\n";
  print MAIL "E-mail adres: $in{'email'} \n\n";
  print MAIL "Remote IP address: $ENV{'REMOTE_ADDR'}\n";
  close(MAIL);
Technical Details
Message-ID: <34A641C7.F8FFFFAA@horizon.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1043e7,18dfbd58b6c48e0f,start
X-Google-Attributes: gid1043e7,public
X-Google-Thread: 112333,18dfbd58b6c48e0f,start
X-Google-Attributes: gid112333,public
X-Google-Thread: 1133f4,18dfbd58b6c48e0f,start
X-Google-Attributes: gid1133f4,public
From: "T. de Konink" <tkonink@horizon.nl>
Subject: HELP !!! Attachment with sendmail (Perl under linux)
Date: 1997/12/28
Message-ID: <34A641C7.F8FFFFAA@horizon.nl>
X-Deja-AN: 310742978
Cache-Post-Path: noon.horizon.nl!unknown@dawn12.horizon.nl
Content-Transfer-Encoding: 7bit
X-Server-Date: 28 Dec 1997 12:12:33 GMT
Content-Type: text/plain; charset=us-ascii
Organization: Horizon Internet
Mime-Version: 1.0
Reply-To: tkonink@horizon.nl
Newsgroups: de.comp.lang.perl,fj.lang.perl,fr.comp.lang.perl