{"id":13595386,"url":"https://github.com/ayushgun/easygmail","last_synced_at":"2026-02-03T01:11:00.168Z","repository":{"id":216214150,"uuid":"740748739","full_name":"ayushgun/easygmail","owner":"ayushgun","description":"A lightweight, minimalistic, and synchronous Python package for quickly sending emails via Gmail.","archived":false,"fork":false,"pushed_at":"2024-02-22T15:58:54.000Z","size":28,"stargazers_count":130,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-01T16:39:49.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/ayushgun.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":"2024-01-09T01:33:42.000Z","updated_at":"2024-06-22T07:55:09.000Z","dependencies_parsed_at":"2024-01-11T18:24:56.341Z","dependency_job_id":"74f62fad-4f04-4dc2-87e9-e8f83ed271f0","html_url":"https://github.com/ayushgun/easygmail","commit_stats":null,"previous_names":["ayushgun/easygmail"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayushgun%2Feasygmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayushgun%2Feasygmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayushgun%2Feasygmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayushgun%2Feasygmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayushgun","download_url":"https://codeload.github.com/ayushgun/easygmail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223394336,"owners_count":17138529,"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-08-01T16:01:49.124Z","updated_at":"2026-02-03T01:11:00.116Z","avatar_url":"https://github.com/ayushgun.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# EasyGmail\n\n## Overview\n\nEasyGmail is a lightweight, minimalistic, and synchronous Python API designed for quick email sending via Gmail.\n\n## Roadmap\n\nThe current release is a beta release. By stable release 1.0, the following features are projected to be added:\n\n- [ ] Unit testing\n- [ ] Static Site Documentation\n- [ ] File Attachments\n- [ ] HTML Emails\n- [ ] Variadic Recipients\n\n## Getting Started\n\n### Installation\n\n```\npip install git+https://github.com/ayushgun/easygmail\n```\n\n### Prerequisites\n\nBefore using EasyGmail, ensure you have an [app password](https://support.google.com/mail/answer/185833?hl=en#app-passwords) for Gmail. Do **not** use your regular account password.\n\n### Quick Start Example\n\n```python\nfrom easygmail import Client, EmailBuilder\n\nclient = Client(\"\u003caddress\u003e@gmail.com\", \"\u003capp password\u003e\")\n\nmsg = EmailBuilder(\n    receiver=\"\u003crecipient\u003e@domain.com\", subject=\"\u003csubject text\u003e\", body=\"\u003cbody text\u003e\"\n).build()\n\nclient.send(msg)\n```\n\n### Client Initialization\n\nYou can instantiate a `Client` object in two ways:\n\n1. **Direct Credentials**:\n   Provide email address and app password directly as arguments.\n\n```python\nfrom easygmail import Client\n\nclient = Client(\"\u003caddress\u003e@gmail.com\", \"\u003capp password\u003e\")\n```\n\n2. **Environment File**:\n   Use a `.env` file to store credentials.\n\n```python\nfrom easygmail import Client\n\nclient = Client(env_file=\".env\")\n```\n\nYour `.env` file should contain:\n\n```bash\nEMAIL_ADDRESS=\"\u003caddress\u003e@gmail.com\"\nPASSWORD=\"\u003capp password\u003e\"\n```\n\n### Creating Email Messages\n\nCreate `EmailMessage` objects using one of the following methods:\n\n1. **EmailBuilder Constructor**:\n\n```python\nfrom easygmail import EmailBuilder\n\nmsg = EmailBuilder(\n    receiver=\"\u003crecipient\u003e@domain.com\", subject=\"\u003csubject text\u003e\", body=\"\u003cbody text\u003e\"\n).build()\n```\n\n2. **EmailBuilder Factory Interface**:\n\n```python\nfrom easygmail import EmailBuilder\n\nmsg = (\n    EmailBuilder()\n    .set_receiver(\"\u003crecipient\u003e@domain.com\")\n    .set_subject(\"\u003csubject text\u003e\")\n    .set_body(\"\u003cbody text\u003e\")\n).build()\n```\n\n3. **Directly Using `EmailMessage`**:\n\n```python\nfrom email.message import EmailMessage\n\nmsg = EmailMessage()\nmsg[\"To\"] = \"\u003crecipient\u003e@domain.com\"\nmsg[\"Subject\"] = \"\u003csubject text\u003e\"\nmsg.set_content(\"\u003cbody text\u003e\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushgun%2Feasygmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayushgun%2Feasygmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushgun%2Feasygmail/lists"}