🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.linux.help
2 messages
2 total messages Started by T. de Konink Sun, 28 Dec 1997 00:00
HELP !!! Attachment with sendmail (Perl under linux)
#280
Author: T. de Konink
Date: Sun, 28 Dec 1997 00:00
30 lines
2133 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);
Re: HELP !!! Attachment with sendmail (Perl under linux)
#281
Author: Jonas Luster
Date: Sun, 28 Dec 1997 00:00
25 lines
2128 bytes
T. de Konink <tkonink@horizon.nl> wrote:

> 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.

>   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);

Why not just uuencode this file and append it as normal text?

Jonas

-- 
.. -.-. ....     | (BodyScan-Trap)          | Infos und Verhaltensregeln zum
.-.. .. . -... . | brian.jones@stones.com   | deutschsprachigen Usenet
.--. . - .-. .-  | (just for you, spammers) | gibts hier: de.newusers.infos
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads