diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-12-28 18:07:18 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-12-28 18:07:18 +0200 |
commit | f113836a8fc282b7c7642eff82a4cf73d8e346fa (patch) | |
tree | b86631e738f84ba40d7244e8c3c9cf2ac627c25f /awklib/eg/network/mailpopclient.awk | |
parent | ce2fcf704aac494b44c78a34c714732685dfc1ad (diff) | |
download | egawk-f113836a8fc282b7c7642eff82a4cf73d8e346fa.tar.gz egawk-f113836a8fc282b7c7642eff82a4cf73d8e346fa.tar.bz2 egawk-f113836a8fc282b7c7642eff82a4cf73d8e346fa.zip |
Additional update in gawkinet.texi.
Diffstat (limited to 'awklib/eg/network/mailpopclient.awk')
-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) +} |