{"id":19312030,"url":"https://github.com/weblineindia/nodejs-sendmail","last_synced_at":"2025-02-24T03:42:41.906Z","repository":{"id":129984761,"uuid":"276082687","full_name":"weblineindia/NodeJS-SendMail","owner":"weblineindia","description":"A NodeJS SendMail component used for sending mails using Amazon SES and normal mail service.","archived":false,"fork":false,"pushed_at":"2023-12-27T08:00:40.000Z","size":294,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-06T02:26:45.441Z","etag":null,"topics":["amazon-ses","amazon-simple-email-service","amazonses","node-component","node-library","node-module","node-send-email","node-sendmail","nodejs","nodejs-component","nodejs-modules","nodejs-sendmail","sendmail-component","sendmail-smtp","sendmail-utility","simple-email-service"],"latest_commit_sha":null,"homepage":"https://www.weblineindia.com/communities.html","language":"HTML","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/weblineindia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-06-30T11:42:36.000Z","updated_at":"2023-12-27T08:00:24.000Z","dependencies_parsed_at":"2023-06-17T06:31:07.818Z","dependency_job_id":null,"html_url":"https://github.com/weblineindia/NodeJS-SendMail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FNodeJS-SendMail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FNodeJS-SendMail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FNodeJS-SendMail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FNodeJS-SendMail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weblineindia","download_url":"https://codeload.github.com/weblineindia/NodeJS-SendMail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240415216,"owners_count":19797599,"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":["amazon-ses","amazon-simple-email-service","amazonses","node-component","node-library","node-module","node-send-email","node-sendmail","nodejs","nodejs-component","nodejs-modules","nodejs-sendmail","sendmail-component","sendmail-smtp","sendmail-utility","simple-email-service"],"created_at":"2024-11-10T00:32:17.251Z","updated_at":"2025-02-24T03:42:41.865Z","avatar_url":"https://github.com/weblineindia.png","language":"HTML","readme":"# NodeJS SendMail\n\nA NodeJS SendMail component used for sending mails using Amazon SES and normal mail service. \n\n## Table of contents\n\n* [Getting started](#getting-started)\n* [Features](#features)\n* [Usage](#usage)\n* [Mail Options](#mail-options)\n* [Examples](#examples)\n* [Want to Contribute?](#want-to-contribute)\n* [Need Help / Support?](#need-help)\n* [Collection of Other Components](#collection-of-components)\n* [Changelog](#changelog)\n* [Credits](#credits)\n* [License](#license)\n* [Keywords](#keywords)\n\n## Getting started\n\nInstall the npm package:\n\n``` bash\nnpm install nodejs-weblineindia-sendmail\n#OR\nyarn add nodejs-weblineindia-sendmail\n```\n\n## Features\n\n* This component is used to send mails.\n* Provides email templates for attachment and activating account.\n* Also supports AWS send mail service and normal mail service.\n\n## Usage\n\nUse `EmailService` function to send email: \n  It is an asynchronous function.\n\n``` js\nconst sendmail = require('nodejs-weblineindia-sendmail')\nOR\nimport sendmail from 'nodejs-weblineindia-sendmail'\n```\n\n### use of `EmailService` function \n\n``` js\nasync function mailsend() {\n    let result = await sendmail.EmailService({\n        emailInfo: {\n            service: 'normal',\n            fromEmail: 'frommail@abc.com',\n            toEmail: 'tomail@abc.com',\n            username: 'username',\n            hostname: 'hostsite'\n        },\n        auth: {\n            host: 'smtp.abc.com',\n            port: 587,\n            user: 'user',\n            pass: 'password'\n        },\n        template: 'activateAccount'\n        attachment: [{ // utf-8 string as an attachment\n            filename: 'photo.png',\n            path: path.resolve(__dirname, 'photo.png')\n        }]\n    })\n}\n\n// call mailsend() function\nmailsend()\n```\n\n## Mail Options\n\n-------\n\n### emailInfo :\n\n* service \n\n    This has following option : \n\n    - 'aws' : Using AWS service\n    - 'normal' : Using basic mail service\n\n* fromEmail \n\n    Email address of that user who is sending mail.\n\n* toEmail\n\n    Email address of that user who is receiver for that mail.\n\n* username\n\n    optional field.Name of user to show in mail.\n\n* hostname\n\n    optional field.Host for link generation.\n\n### auth :\n\n* host \n\n    Hostname of service provider.\n\n* port\n\n    Port number.\n\n* secure \n\n    true or false value.\n\n* user\n\n    username.\n\n* pass\n\n    password.\n\n### template :\n\n    This field provides option to choose mail template. It has two following templates:\n\n        - activateAccount\n        - attachment\n\n### attachment : \n\n    This is optional field. It contains an array of attachment objects.\n\n-----\n\n## Examples\n\n-----\n\nActivate Account with link generation\n\n``` js\nasync function mailsend() {\n    let result = await sendmail.EmailService({\n        emailInfo: {\n            service: 'normal',\n            fromEmail: 'abc@xyx.com',\n            toEmail: 'tomail@getairmail.com',\n            username: 'user',\n            hostname: 'http://host/'\n        },\n        auth: {\n            host: 'smtp.gmail.com',\n            port: 587,\n            user: 'abcd@user.com',\n            pass: 'password'\n        },\n        template: 'activateAccount'\n    })\n}\n// call mailsend() function\nmailsend()\n```\n\nAttachment\n\n``` js\nasync function mailsend() {\n    let result = await sendmail.EmailService({\n        emailInfo: {\n            service: 'normal',\n            fromEmail: 'abc@xyx.com',\n            toEmail: 'tomail@getairmail.com'\n        },\n        auth: {\n            host: 'smtp.gmail.com',\n            port: 587,\n            user: 'abcd@user.com',\n            pass: 'password'\n        },\n        template: 'attachment',\n        attachment: [{\n            // utf-8 string as an attachment\n            filename: 'image.png',\n            path: path.resolve(__dirname, 'image.png')\n        }]\n    })\n}\n// call mailsend() function\nmailsend()\n```\n\n## Want to Contribute?\n\n* Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).\n* [Fork it](http://help.github.com/forking/).\n* Create new branch to contribute your changes.\n* Commit all your changes to your branch.\n* Submit a [pull request](http://help.github.com/pull-requests/).\n\n-----\n\n## Need Help? \n\nWe also provide a free, basic support for all users who want to use this NodeJS SendMail component in their software project. In case you want to customize this SendMail component to suit your development needs, then feel free to contact our [NodeJS developers](https://www.weblineindia.com/hire-node-js-developer.html).\n\n-----\n\n## Collection of Components\n\nWe have built many other components and free resources for software development in various programming languages. Kindly click here to view our [Free Resources for Software Development](https://www.weblineindia.com/communities.html).\n\n------\n\n## Changelog\n\nDetailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).\n\n## Credits\n\nnodejs-weblineindia-sendmail is inspired by [nodemailer](https://nodemailer.com/about/). \n\n## License\n\n[MIT](LICENSE)\n\n[mit]: https://github.com/miguelmota/is-valid-domain/blob/e48e90f3ecd55431bbdba950eea013c2072d2fac/LICENSE\n\n## Keywords\n\nnodejs-weblineindia-sendmail, nodejs-sendmail, nodejs, node-component, nodecomponent, node\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fnodejs-sendmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweblineindia%2Fnodejs-sendmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fnodejs-sendmail/lists"}