{"id":15945481,"url":"https://github.com/ig3/sendmail","last_synced_at":"2026-01-05T03:04:43.770Z","repository":{"id":247564298,"uuid":"822526483","full_name":"ig3/sendmail","owner":"ig3","description":"An interface to Linux sendmail command","archived":false,"fork":false,"pushed_at":"2024-07-16T17:25:14.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T19:40:18.460Z","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/ig3.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T10:10:51.000Z","updated_at":"2024-07-16T17:25:18.000Z","dependencies_parsed_at":"2024-10-23T14:08:01.319Z","dependency_job_id":null,"html_url":"https://github.com/ig3/sendmail","commit_stats":null,"previous_names":["ig3/sendmail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ig3%2Fsendmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ig3%2Fsendmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ig3%2Fsendmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ig3%2Fsendmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ig3","download_url":"https://codeload.github.com/ig3/sendmail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244309126,"owners_count":20432309,"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":[],"created_at":"2024-10-07T09:02:55.348Z","updated_at":"2026-01-05T03:04:43.698Z","avatar_url":"https://github.com/ig3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @ig3/sendmail\n\nThis is a very simple interface to the Linux `sendmail` command for sending\nemail.\n\n## Prerequisites\n\nEnsure a compatible `sendmail` command is installed.\n * [Sendmail](http://www.sendmail.org/)\n * [postfix](http://www.postfix.org/)\n * [exim](https://github.com/Exim/exim)\n * anything else that provides a compatible sendmail executable\n\n## Installation\n\n```\n$ npm install @ig3/sendmail\n```\n\n## Example\n\n```\nconst sendmail = require('@ig3/sendmail');\nsendmail({\n  from: 'from@example.com',\n  to: 'to@example.com',\n  subject: 'Test subject',\n  body: 'The body of the email'\n})\n.then(() =\u003e {\n  console.log('The email has been sent');\n})\n.catch(err =\u003e {\n  console.log('Attempt to send email failed with error: ', err);\n});\n```\n\n## API\n\n### sendmail(options)\n\nThe sendmail function requires an options object as sole argument.\n\nIt returns a Promise that resolves after the email has been sent (i.e. the\n`sendmail` command has been run successfully to send the email, which may\nresult in the email being queued rather than sent immediately, depending on\nthe `sendmail` command implementation.\n\n#### options\n\n##### from\n\nThe email address the email is to be from. This must be a single email\naddress, as a string;\n\n##### replayTo\n\nThe email address that replies should be sent to. This must be a single\nemail address, as a string.\n\n##### to\n\nThe email addresses the email should be sent to. This may be a single email\naddress as a string or an array of one or more email addresses.\n\n##### cc\n\nEmail addresses the email should be copied to. This may be a single email\naddress as a string or an array of zero or more email addresses.\n\n##### bcc\n\nEmail addresses the email should be blind copied to. This may be a single\nemail address as a string or an array of zero or more email addresses.\n\n##### subject\n\nThe subject of the email, as a string.\n\n##### path\n\nPath to the `sendmail` command, as a string. Default is 'sendmail'.\n\n##### envelopeFrom\n\nThe envelope from address, passed as value of option `-f` of the `sendmail`\ncommand, to set the envelope 'from' address, distinct from the header\n'From' address.\n\n##### bodyType\n\nThis may be set to 'html' to send a multipart email with an html part and\noptional plain text part (see plaintext).\n\n##### body\n\nThis is the text of the body of the email as a string. \n\n##### plaintext\n\nThis is the text of the plain text body of the email, as a string.\n\nIf bodyType is 'html' then this may be set to include an alternate plain\ntext part. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fig3%2Fsendmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fig3%2Fsendmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fig3%2Fsendmail/lists"}