{"id":19142385,"url":"https://github.com/eldoy/mxmail","last_synced_at":"2025-05-06T23:46:11.365Z","repository":{"id":57305958,"uuid":"357312638","full_name":"eldoy/mxmail","owner":"eldoy","description":"Send mail directly to mail exchange servers or SMTP.","archived":false,"fork":false,"pushed_at":"2023-03-10T12:18:49.000Z","size":263,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:46:36.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/eldoy.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-12T19:18:54.000Z","updated_at":"2022-06-04T21:51:38.000Z","dependencies_parsed_at":"2024-11-09T07:30:06.594Z","dependency_job_id":"9d5b808c-02d5-4459-8af1-b4b73155d55c","html_url":"https://github.com/eldoy/mxmail","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"e8bb94f9ecd51a412c6ba329acfef4d9c77a994b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fmxmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fmxmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fmxmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Fmxmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldoy","download_url":"https://codeload.github.com/eldoy/mxmail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252788404,"owners_count":21804280,"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-11-09T07:27:03.669Z","updated_at":"2025-05-06T23:46:11.350Z","avatar_url":"https://github.com/eldoy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mxmail\n\nSend email from the command line or your app.\n\n### Installation\n\n```\nnpm i mxmail\n```\n\n### Usage\n\n```js\nconst mxmail = require('mxmail')\n\n// If config is defined, mx lookup is skipped\nconst config = {\n  host: 'smtp.ethereal.email',\n  port: 587,\n  auth: {\n    user: 'virginia.cassin10@ethereal.email',\n    pass: '1md9Xes49Nbfka6aFw'\n  }\n}\nconst mailer = mxmail(config)\n\n// Set up mail\nconst mail = {\n  from: '\"Fred Foo 👻\" \u003cfoo@example.com\u003e',\n  to: 'bar@example.com, baz@example.com',\n  subject: 'Hello ✔',\n  text: 'Are you ready?',\n  html: '\u003cb\u003eAre you ready?\u003c/b\u003e'\n}\n\n// Will lookup mx records automatically for each email in 'to'\nconst result = await mailer(mail)\n```\n\n### Command line\n\nInstall the command line interface with:\n```\nnpm i -g mxmail\n```\n\nAdd a settings file in ~/.mxmail.json:\n```json\n{\n  \"from\": \"vidar@example.com\",\n  \"config\": {\n    \"host\": \"smtp.ethereal.email\",\n    \"port\": 587,\n    \"auth\": {\n      \"user\": \"virginia.cassin10@ethereal.email\",\n      \"pass\": \"1md9Xes49Nbfka6aFw\"\n    }\n  },\n  \"aliases\": {\n    \"@sp\": \"suong@example.com\"\n  }\n}\n```\n\nSend email like this from the command line (terminal):\n```\nmx suong@example.com subject \"This is the message\"\n```\n\nReplace with aliases like this:\n```\nmx @sp subject \"This is the message\"\n```\n\nSend file attachments like this:\n```\nmx @ve \"File\" \"Check this\" ~/file.jpg\n```\n\nUsing zsh alias:\n```\nalias file='mx @ve \"\" \"\"'\nfile ~/file.jpg\n```\n\nMIT Licensed. Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fmxmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldoy%2Fmxmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Fmxmail/lists"}