On Sat, Oct 07, 2000 at 05:25:33PM -0400, jim wrote:
> I want to study and understand that string of code that Andy gave before I
> use it. Oliver, you attatched a .dat file with nothing much in it.
well, it's not my fault if outlook doesn't support attached pgp signatures :)
Here is the kind of program you can use: (just to give you an idea:
its not perfect, but at least it works :)
#!/usr/bin/perl
$date = localtime; # e.g "Tue Oct 14 14:22:56 1997"
$nummer = $ARGV[0]; chomp $nummer;
$recipient = $nummer . "\@sms.ip-plus.net";
$mailprog = '/usr/lib/sendmail';
@text = <STDIN>;
#$msg = "Datum: $date\n";
$msg = ""; $from = "s\@m.s";
$mailtext = 0;
foreach $line (@text) {
if ($line =~ /From:/ || $line =~ /Subject:/ || $mailtext) {
if ($line =~ /^From:/) {
$tmpfrom = substr($line,6); chomp $tmpfrom;
$txtfrom = "\n[F:" . $tmpfrom . "]\n";
}
if ($line =~ /^Subject:/) {
$tmpsubj = substr($line,9); chomp $tmpsubj;
}
$msg .= $line;
}
chomp $line;
if ($line eq "" && $mailtext == 0) {
$mailtext = 1;
$msg .= $txtfrom;
}
}
open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
print MAIL "From: $from\n";
print MAIL <<END1;
$msg
END1
close (MAIL);
and with something like that in the .qmail file :
| /home/8304/progs/sms.pl 09828378741
Regards,
Olivier
--
_________________________________________________________________
Olivier Mueller - [EMAIL PROTECTED] - PGPkeyID: 0E84D2EA - Switzerland
PGP signature