{"id":22394170,"url":"https://github.com/atlantis-software/mailx","last_synced_at":"2025-07-31T10:32:30.646Z","repository":{"id":25849741,"uuid":"29289403","full_name":"Atlantis-Software/mailx","owner":"Atlantis-Software","description":"POP,IMAP and SMTP clients","archived":false,"fork":false,"pushed_at":"2018-04-18T07:31:24.000Z","size":41,"stargazers_count":18,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-07T11:17:00.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Atlantis-Software.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}},"created_at":"2015-01-15T09:08:01.000Z","updated_at":"2023-12-04T21:00:35.000Z","dependencies_parsed_at":"2022-08-24T14:15:14.937Z","dependency_job_id":null,"html_url":"https://github.com/Atlantis-Software/mailx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Atlantis-Software/mailx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atlantis-Software%2Fmailx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atlantis-Software%2Fmailx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atlantis-Software%2Fmailx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atlantis-Software%2Fmailx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atlantis-Software","download_url":"https://codeload.github.com/Atlantis-Software/mailx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atlantis-Software%2Fmailx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268024591,"owners_count":24183149,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-05T05:09:18.966Z","updated_at":"2025-07-31T10:32:30.372Z","avatar_url":"https://github.com/Atlantis-Software.png","language":"JavaScript","readme":"Mailx\n-------\n\n[![npm version](https://badge.fury.io/js/mailx.svg)](https://www.npmjs.com/mailx)\n[![Build Status](https://travis-ci.org/Atlantis-Software/mailx.svg?branch=master)](https://travis-ci.org/Atlantis-Software/mailx)\n[![Coverage Status](https://coveralls.io/repos/github/Atlantis-Software/mailx/badge.svg?branch=master)](https://coveralls.io/github/Atlantis-Software/mailx?branch=master)\n[![NSP Status](https://nodesecurity.io/orgs/atlantis/projects/197e1a87-263d-4dec-90d7-4e1850240fc4/badge)](https://nodesecurity.io/orgs/atlantis/projects/197e1a87-263d-4dec-90d7-4e1850240fc4)\n[![Dependencies Status](https://david-dm.org/Atlantis-Software/mailx.svg)](https://david-dm.org/Atlantis-Software/mailx)\n\nmailx is a simple and complete email client library (pop, imap and smtp) for nodejs. \n\n----------\n\n\u003ci class=\"icon-pencil\"\u003e\u003c/i\u003e Write and send an Email\n---------------------------------------------------\n\n#### \u003ci class=\"icon-file\"\u003e\u003c/i\u003e Message objet\nthe message object is used to write or read a message.\n\n**Sample:** write a new message\n```javascript\nvar message = mailx.message();\nmessage.setFrom('me', 'me@example.net');\nmessage.addTo('you', 'you@example.net');\nmessage.setSubject('hello');\nmessage.setText('hi ! how are u?'); \nmessage.setHtml('hi ! how are u? \u003cb\u003ehugs\u003c/b\u003e');\n```\n#### \u003ci class=\"icon-upload\"\u003e\u003c/i\u003e Transport object\nthe transport objet is used to send a predefined message.\n\n**Sample:** sending a message\n```javascript\nvar transport = mailx.transport('smtp.example.net', 25, 'login', 'password');\ntransport.send(message, function(err,result) {\n    console.log(result);\n});\n```\n\n\u003ci class=\"icon-download\"\u003e\u003c/i\u003e Receive Email\n-------------------------------------------\n\n\u003ci class=\"icon-download\"\u003e\u003c/i\u003e Store object\n\n**Sample:** get all messages from server, log their subjets and delete the last one\n```javascript\nvar store = mailx.store('pop3', 'pop.example.net', 110, 'login', 'password');\nstore.connect(function(err) {\n  if (err) {\n    return console.log('connect error', err);\n  }\n  store.getInboxMessages(0, function(err, messages) {\n    if (err) {\n      return console.log('inbox error', err);\n    }\n    messages.forEach(function(message,index) {\n      console.log(message.subject);\n      if (index === messages.length - 1) {\n        message.delete(function(err, data) {\n          console.log('message deleted!', data);\n          store.close(function(err, data) {\n            console.log('store.close err:', err);\n          });\n        });\n      }\n    });\n  });\n});\n```\n\n**Sample:** get message by message from server and log their subjets\n```javascript\nvar store = mailx.store('imap', 'imap.example.net', 143, 'login', 'password');\nstore.connect(function(err) {\n  if (err) {\n    return console.log('err connect: ', err);\n  }\n  var inbox = store.getInbox(1);\n  inbox.fail(function(err){\n    console.log('fail get messages: ', err);\n  });\n  inbox.done(function(status){  \n    console.log('end of inbox');\n  });\n  (function recursiveRcpt() {\n    inbox.getNextMessage(function(err, message) {\n      if (err) {\n        return console.log('fail get message: ', err);\n      }\n      if (message === null) {\n        return console.log('no more message to read');\n      }\n      console.log(message.subject);\n      recursiveRcpt();\n    });\n  })();\n});\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlantis-software%2Fmailx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlantis-software%2Fmailx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlantis-software%2Fmailx/lists"}