{"id":19989087,"url":"https://github.com/wk989898/mail","last_synced_at":"2026-05-19T07:09:52.663Z","repository":{"id":47840851,"uuid":"266469217","full_name":"wk989898/mail","owner":"wk989898","description":"send and receive mail","archived":false,"fork":false,"pushed_at":"2022-05-01T04:16:31.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T01:39:22.324Z","etag":null,"topics":["email","imap","mail-client","node","smtp"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/wk989898.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-24T04:27:37.000Z","updated_at":"2022-02-27T08:05:00.000Z","dependencies_parsed_at":"2022-09-24T11:41:26.060Z","dependency_job_id":null,"html_url":"https://github.com/wk989898/mail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wk989898/mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk989898%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk989898%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk989898%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk989898%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wk989898","download_url":"https://codeload.github.com/wk989898/mail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk989898%2Fmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"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":["email","imap","mail-client","node","smtp"],"created_at":"2024-11-13T04:45:25.341Z","updated_at":"2026-05-19T07:09:52.648Z","avatar_url":"https://github.com/wk989898.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-mail-client\n[![Build Status](https://travis-ci.com/wk989898/mail.svg?branch=master)](https://travis-ci.com/wk989898/mail)\n![npm](https://img.shields.io/npm/v/node-mail-client)\n## Intro\nAn email client for receiving and sending emails  \nBased IMAP and SMTP\n## Installation\n``` js\nnpm install node-mail-client\n```\n## Usage\n```js\n// checkAuth will be called automatically and it will check email account authenticity\nconst mailClient=require('node-mail-client')\nlet mail=new mailClient({\n  user:`*@gmail.com`, // your address\n  pass:`***`, // your password\n  imap:['imap.*.com',993], // [host,port,tls]\n  smtp:['smtp.*.com',587], // [host,port,secure]\n  name:'Jack' // your name when send\n})\n// receive\nmail.receive(null).then(result=\u003e{\n  // do something\n}).catch(err=\u003e{\n  console.log(err)  \n})\n// send \nmail.send({ to, subject, text, html }).then(info=\u003e{})\n.catch(console.error)\n\n// skip checkAuth check\nmail.check=1  // 0: init  1:pass  2:fail\n```\n## API\n```js\nreceive:\n//@param: {string | (total:number)=\u003estring | null} setNum\n//string alike '1:10' or '1:*' \n//'total' is the total number of box messages\nreceive('1:*').then()\nreceive(total=\u003e`1:${total-10}`).then()\nreceive(null).then()\n\nsend:\n/*\n* @param:Object\n*  {\n*     to: \"any@163.com\", // list of receivers\n*     subject: \"Hello\", // Subject line\n*     text: \"Hello world? text\", // plain text body\n*     html: \"\u003cb\u003eHello world?\u003c/b\u003e\", // html body\n*  }\n*/\n\n```\n### Here is an [example](./example/main.js)\n## Documention\nyou could find specify  about API  \n[send](https://nodemailer.com/about/)  \n[receive](https://github.com/mscdex/node-imap)  \n\n## Credits\n[node-imap](https://github.com/mscdex/node-imap)  \n[Nodemailer](https://github.com/nodemailer/nodemailer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk989898%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwk989898%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk989898%2Fmail/lists"}