home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
sends406.zip
/
userexit
< prev
Wrap
Text File
|
1998-12-22
|
1KB
|
34 lines
#!/usr/local/bin/perl
$mailprogramm = "/usr/lib/sendmail -t > /dev/null";
#$mailprogramm = "sendmail -t > nul";
if ($ARGV[0] == "-1") {
if (open(MAIL, "|".$mailprogramm)) {
print MAIL "To: ", $ARGV[1], "\n";
print MAIL "From: SendSMS\n";
print MAIL "Subject: Message not delivered\n\n";
print MAIL "Your follwing message to ", $ARGV[2], " couldn't be delivered.\n\n";
print MAIL $ARGV[3], "\n";
close(MAIL);
}
} elsif ($ARGV[0] == "1") {
if (open(MAIL, "|".$mailprogramm)) {
print MAIL "To: ", $ARGV[1], "\n";
print MAIL "From: SendSMS\n";
print MAIL "Subject: Message sent successfully\n\n";
print MAIL "Your following message to ", $ARGV[2], " was sent successfully.\n\n";
print MAIL $ARGV[3], "\n";
close(MAIL);
}
} elsif ($ARGV[0] == "2") {
if (open(MAIL, "|".$mailprogramm)) {
print MAIL "To: ", $ARGV[2], "\n";
print MAIL "From: ", SendSMS, "\n";
print MAIL "Subject: Message received\n\n";
print MAIL "The following message from ", $ARGV[1], " was received.\n\n";
print MAIL $ARGV[3], "\n";
close(MAIL);
}
}
exit;