diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-12-28 18:07:45 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-12-28 18:07:45 +0200 |
commit | 7c95bf2e5e112f1acdf2e058daaac3cdb2b0bb12 (patch) | |
tree | 4081ccf5e573da276658e18be275132d78a16a33 /awklib | |
parent | 7920288ae1ac5fcf167421223517e338eca68897 (diff) | |
parent | f113836a8fc282b7c7642eff82a4cf73d8e346fa (diff) | |
download | egawk-7c95bf2e5e112f1acdf2e058daaac3cdb2b0bb12.tar.gz egawk-7c95bf2e5e112f1acdf2e058daaac3cdb2b0bb12.tar.bz2 egawk-7c95bf2e5e112f1acdf2e058daaac3cdb2b0bb12.zip |
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'awklib')
-rw-r--r-- | awklib/eg/network/mailpopclient.awk | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/awklib/eg/network/mailpopclient.awk b/awklib/eg/network/mailpopclient.awk new file mode 100644 index 00000000..041c5629 --- /dev/null +++ b/awklib/eg/network/mailpopclient.awk @@ -0,0 +1,16 @@ +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) +} |