{"id":21967168,"url":"https://github.com/rgglez/fc-gomail","last_synced_at":"2026-04-13T12:31:41.763Z","repository":{"id":143725003,"uuid":"615814363","full_name":"rgglez/fc-gomail","owner":"rgglez","description":"Event handler for Aliyun Function Compute. It sends email using the gomail module. Intended to be triggered by Aliyun MNS.","archived":false,"fork":false,"pushed_at":"2026-02-03T04:53:05.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T18:27:14.742Z","etag":null,"topics":["aliyun","aliyun-fc","go","gomail","handler","mailer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgglez.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":"2023-03-18T18:52:32.000Z","updated_at":"2026-02-03T04:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"5328f321-ee74-42b5-a7ca-fae783f0effa","html_url":"https://github.com/rgglez/fc-gomail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rgglez/fc-gomail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Ffc-gomail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Ffc-gomail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Ffc-gomail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Ffc-gomail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgglez","download_url":"https://codeload.github.com/rgglez/fc-gomail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgglez%2Ffc-gomail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aliyun","aliyun-fc","go","gomail","handler","mailer"],"created_at":"2024-11-29T13:22:14.896Z","updated_at":"2026-04-13T12:31:41.754Z","avatar_url":"https://github.com/rgglez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fc-gomail\n\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) ![GitHub all releases](https://img.shields.io/github/downloads/rgglez/fc-gomail/total) ![GitHub issues](https://img.shields.io/github/issues/rgglez/fc-gomail) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/rgglez/fc-gomail)\n\nThis event handler sends an email using the [Gomail](https://github.com/go-gomail/gomail) module, in response of a trigger originated from the Aliyun MNS message service, where a message must be published by another program. It's written in [Go](https://go.dev/) for the Aliyun FC FaaS service. Use cases could be a notification service or a login confirmation.\n\nIt's intended to run from a [custom Docker container](https://www.alibabacloud.com/help/en/function-compute/latest/create-a-function) sourced from Aliyun Container Service, so it implements a webserver on its own.\n\nThe message sent to Aliyun MNS must have this structure, in JSON:\n\n```javascript\n{\n   \"From\":\"\u003cfrom@email.address\u003e\",\n   \"To\":\"\u003cto@email.address\u003e\",\n   \"Subject\":\"The subject of the message\",\n   \"Body\":\"The body of the message\"\n}\n```\n\n## Configuration\n\nThe configuration, in the case of the code in this repository, is based in a YAML file, which is loaded into a variable map. \n\nThe structure of the relevant part of the YAML must be like this:\n\n```yaml\nSMTP:\n  HOST: smtp.yourserver.com\n  PORT: 2525\n  LOGIN: \u003cyour login\u003e\n  PASSWORD: \u003cyour password\u003e\n```\n\nThe load might look like this:\n\n```go\nconf := config{} \ncfg := conf.load()\n```\n\nWhere conf is an struct and cfg the map containing the loaded YAML.\n\nOf course, feel free to change this part as you need.\n\n## Notes\n\n* A sample *Dockerfile* in provided, which you might adjust to your use case.\n* A sample *Makefile* to compile the Go code is provided, which you might adjust to your use case.\n* The *Makefile* uses \"handler\" as the name of the compiled binary, so you must either use this name in your FC configuration, or make changes accordingly.\n* Aliyun refers to Alibaba Cloud Services, but this code can be easily adapted to run in AWS Lambda, for instance.\n\n## License\n\nCopyright (c) 2026, Rodolfo González González.\n\nRead the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgglez%2Ffc-gomail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgglez%2Ffc-gomail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgglez%2Ffc-gomail/lists"}