Files
server/usr/share/doc/gawk/examples/network/mailpopclient.awk
2026-01-07 20:52:11 +01:00

17 lines
503 B
Awk

BEGIN {
POPService = "/inet/tcp/0/var{emailhost}/pop3"
RS = ORS = "\r\n"
print "user var{name}" |& POPService
POPService |& getline
print "pass var{password}" |& POPService
POPService |& getline
print "retr 1" |& POPService
POPService |& getline
if ($1 != "+OK") exit
print "quit" |& POPService
RS = "\r\n\\.\r\n"
POPService |& getline
print $0
close(POPService)
}