{"id":13781491,"url":"https://github.com/thinkjs/think-email","last_synced_at":"2025-10-30T20:31:44.665Z","repository":{"id":73609571,"uuid":"98088340","full_name":"thinkjs/think-email","owner":"thinkjs","description":"Send email module for thinkjs3","archived":false,"fork":false,"pushed_at":"2021-07-01T00:21:52.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-21T00:26:40.082Z","etag":null,"topics":["email","mail","thinkjs3"],"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/thinkjs.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-23T09:44:01.000Z","updated_at":"2023-11-14T06:32:25.000Z","dependencies_parsed_at":"2024-01-15T19:45:10.029Z","dependency_job_id":"3226bf18-405d-4f6c-8822-249e70313eb3","html_url":"https://github.com/thinkjs/think-email","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.3125,"last_synced_commit":"622ebd9fef8441752d37103cbb7fe3e84d329be9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thinkjs/think-email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-email/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-email/sbom","scorecard":{"id":881367,"data":{"date":"2025-08-11","repo":{"name":"github.com/thinkjs/think-email","commit":"622ebd9fef8441752d37103cbb7fe3e84d329be9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T08:20:06.259Z","repository_id":73609571,"created_at":"2025-08-24T08:20:06.259Z","updated_at":"2025-08-24T08:20:06.259Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281877512,"owners_count":26577063,"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-10-30T02:00:06.501Z","response_time":61,"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","mail","thinkjs3"],"created_at":"2024-08-03T18:01:26.445Z","updated_at":"2025-10-30T20:31:44.353Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","readme":"# think-email\n\n# think-email\n[![npm](https://img.shields.io/npm/v/think-email.svg?style=flat-square)](https://www.npmjs.com/package/think-email)\n\nEmail extend for ThinkJS 3.x based on [nodemailer](https://github.com/nodemailer/nodemailer).\n\n## Install\n\n```\nnpm install think-email\n```\n## How to use\n\nSet the extend in `src/config/extend.js`\n\n```js\nconst email = require('think-email');\n\nmodule.exports = [\n  email\n];\n```\n\nAnd then the `controller`, `context`, `think` will have the method `sendEmail`. For\nexample in `controller` you can use like this:\n\n```js\n\nthis.sendEmail(transport, options).then(info =\u003e {\n  console.log(info);\n}, err =\u003e {\n  console.log(err);\n});\n```\n\n#### transport like:\n\n```js\n{\n  service: '126',\n  auth: {\n    user: 'aaa@126.com', // your account\n    pass: '******'       // authorization code, not the email password\n  }\n}\n```\n\n#### options like:\n\n```js\n{\n  from: 'aaa@126.com',          // sender address\n  to: 'bbb@qq.com,ccc@qq.com',  // list of receivers\n  cc: 'ddd@126.com',            // cc list of receivers\n  bcc: 'eed@126.com',           // bcc list of receivers\n  subject: 'this is subject',   // subject line\n  html: '\u003cb\u003ethis is HTML content \u003cimg src=\"cid:00000001\"/\u003e\u003c/b\u003e', // html content\n  attachments:[\n    {\n      filename : 'attachment1',\n      path: './package.json'\n    },{\n      filename: 'attachment2',\n      content: '123123'\n    },{\n      filename: 'attachment3',\n      path: 'http://p5.qhimg.com/t012e4e6855de50213e.jpg',\n      cid: '00000001'\n    }\n  ]\n}\n```\n\nMore config options, you can see at [nodemailer doc](https://nodemailer.com/about/).\n","funding_links":[],"categories":["Extends"],"sub_categories":["websocket"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-email/lists"}