{"id":15374185,"url":"https://github.com/moteus/lua-pop3","last_synced_at":"2025-07-09T13:36:22.944Z","repository":{"id":147045728,"uuid":"4809921","full_name":"moteus/lua-pop3","owner":"moteus","description":"POP3 client library for Lua","archived":false,"fork":false,"pushed_at":"2017-05-23T11:51:47.000Z","size":644,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T21:37:45.742Z","etag":null,"topics":["email","lua","pop3","pop3-client"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moteus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-06-27T15:16:33.000Z","updated_at":"2024-04-11T00:08:02.000Z","dependencies_parsed_at":"2024-01-17T07:03:09.623Z","dependency_job_id":"672802c0-f61c-4d40-a8f9-35404015086c","html_url":"https://github.com/moteus/lua-pop3","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-pop3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-pop3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-pop3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moteus%2Flua-pop3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moteus","download_url":"https://codeload.github.com/moteus/lua-pop3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094932,"owners_count":21211837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","lua","pop3","pop3-client"],"created_at":"2024-10-01T13:57:35.372Z","updated_at":"2025-04-15T15:10:32.241Z","avatar_url":"https://github.com/moteus.png","language":"Lua","funding_links":[],"categories":["Email"],"sub_categories":[],"readme":"lua-pop3\n============\n## Build status ##\n[![Licence](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENCE.txt)\n[![Build Status](https://travis-ci.org/moteus/lua-pop3.png?branch=master)](https://travis-ci.org/moteus/lua-pop3)\n[![Coverage Status](https://coveralls.io/repos/moteus/lua-pop3/badge.png)](https://coveralls.io/r/moteus/lua-pop3)\n\nPOP3 client library for Lua 5.1 / 5.2 / 5.3\n\n## Dependences ##\n* [LuaSocket](http://www.impa.br/~diego/software/luasocket)\n\n### Decode text headers/content ###\n* [iconv](http://ittner.github.com/lua-iconv)\n\n### Parse from/to/reply headers ###\n* [lpeg](http://www.inf.puc-rio.br/~roberto/lpeg)\n\n### MD5 modules ###\n* [lmd5](http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lmd5)\n* or [md5](http://www.keplerproject.org/md5/index.html)\n\n### APOP auth ###\n* [lua-crypto](http://luacrypto.luaforge.net)\n* or [openssl](https://github.com/zhaozg/lua-openssl)\n* or one of MD5 modules.\n\n### CRAM MD5 auth ###\n* [lua-crypto](http://luacrypto.luaforge.net)\n* or [openssl](https://github.com/zhaozg/lua-openssl)\n* or one of MD5 modules and bit library.\n\n### Detect current codepage on Windows ###\n* [alien](http://mascarenhas.github.io/alien)\n* or [FFI](https://github.com/jmckaskill/luaffi)\n\n## Usage ##\n\n```lua\nlocal pop3 = require \"pop3\"\n\nlocal some_mail = {\n  host     = os.getenv(\"LUA_MAIL_HOST\") or '127.0.0.1';\n  username = os.getenv(\"LUA_MAIL_USER\") or 'me@host.local';\n  password = os.getenv(\"LUA_MAIL_PASS\") or 'mypassword';\n}\n\nlocal function print_msg(msg, indent)\n  indent = indent or ''\n  print(indent .. \"----------------------------------------------\")\n  print(indent .. \"ID:         \", msg:id())\n  print(indent .. \"subject:    \", msg:subject())\n  print(indent .. \"to:         \", msg:to())\n  print(indent .. \"from:       \", msg:from())\n  print(indent .. \"from addr:  \", msg:from_address())\n  print(indent .. \"reply:      \", msg:reply_to())\n  print(indent .. \"reply addr: \", msg:reply_address())\n  print(indent .. \"trunc:      \", msg:is_truncated())\n  for i,v in ipairs(msg:full_content()) do\n    if v.text        then  print(indent .. \"  \", i , \"TEXT  : \", v.type, #v.text)\n    elseif v.data    then  print(indent .. \"  \", i , \"FILE  : \", v.type, v.disposition, v.file_name or v.name, #v.data)\n    elseif v.message then  print(indent .. \"  \", i , \"RFC822: \", v.type, v.disposition, v.file_name or v.name)\n      print_msg(v.message, indent .. '\\t\\t\\t')\n    end\n  end\nend\n\nlocal mbox = pop3.new()\n\nmbox:open(some_mail.host, some_mail.port or '110')\nprint('open   :', mbox:is_open())\n\nmbox:auth(some_mail.username, some_mail.password)\nprint('auth   :', mbox:is_auth())\n\nfor k, msg in mbox:messages() do\n  print(string.format(\"   *** MESSAGE NO %d ***\", k))\n  print_msg(msg)\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-pop3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoteus%2Flua-pop3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoteus%2Flua-pop3/lists"}