{"id":21013755,"url":"https://github.com/mabroukmahdhi/fleximail","last_synced_at":"2025-05-15T04:34:35.791Z","repository":{"id":252462316,"uuid":"840512164","full_name":"mabroukmahdhi/FlexiMail","owner":"mabroukmahdhi","description":"FlexiMail is a robust, test-driven C# library tailored specifically for seamless email integration using Microsoft Exchange Web Services (EWS).","archived":false,"fork":false,"pushed_at":"2024-11-30T12:31:41.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T04:16:26.888Z","etag":null,"topics":["csharp","dotnet","email","email-sender","ews","ews-api","exchange","microsoft-exchange","test-driven-development"],"latest_commit_sha":null,"homepage":"","language":"C#","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/mabroukmahdhi.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-08-09T22:08:57.000Z","updated_at":"2024-12-04T21:24:58.000Z","dependencies_parsed_at":"2024-08-09T23:53:22.299Z","dependency_job_id":null,"html_url":"https://github.com/mabroukmahdhi/FlexiMail","commit_stats":null,"previous_names":["mabroukmahdhi/fleximail"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabroukmahdhi%2FFlexiMail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabroukmahdhi%2FFlexiMail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabroukmahdhi%2FFlexiMail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabroukmahdhi%2FFlexiMail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mabroukmahdhi","download_url":"https://codeload.github.com/mabroukmahdhi/FlexiMail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254105195,"owners_count":22015609,"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":["csharp","dotnet","email","email-sender","ews","ews-api","exchange","microsoft-exchange","test-driven-development"],"created_at":"2024-11-19T09:44:06.434Z","updated_at":"2025-05-15T04:34:35.784Z","avatar_url":"https://github.com/mabroukmahdhi.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg  src=\"https://github.com/mabroukmahdhi/FlexiMail/blob/main/FlexiMail/icmail.png\"\u003e\n\u003c/p\u003e\n\n# FlexiMail\n\n**FlexiMail** is a flexible email client library designed to integrate seamlessly into your .NET applications. It\nprovides an easy-to-use interface for sending emails and managing various email-related tasks.\n\n[![Nuget](https://img.shields.io/nuget/v/FlexiMail)](https://www.nuget.org/packages/FlexiMail/)\n[![Nuget](https://img.shields.io/nuget/dt/FlexiMail)](https://www.nuget.org/packages/FlexiMail/)\n![.NET 8](https://img.shields.io/badge/.NET_8-COMPATIBLE-2ea44f)\n\n## Features\n\n- **Easy Integration**: Seamlessly integrate FlexiMail into your .NET projects.\n- **Multiple Email Providers**: Support for multiple email service providers. [Call for contribution]\n- **Asynchronous Operations**: Perform email sending and processing asynchronously.\n- **Testable Components**: Easily write unit and integration tests for your email functionality.\n\n## Installation\n\nYou can install **FlexiMail** via NuGet or by adding the project to your solution manually.\n\n### NuGet Installation\n\nTo install FlexiMail using NuGet, run the following command in the NuGet Package Manager Console:\n\n```bash\nInstall-Package FlexiMail\n```\nOr, you can find the package on [NuGet](https://www.nuget.org/packages/FlexiMail). \n\n### .NET CLI Installation\nTo install FlexiMail using the .NET CLI, use the following command:\n```bash\ndotnet add package FlexiMail\n```\n\n### Manual Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/mabroukmahdhi/FlexiMail\n    ```\n2. Add the `FlexiMail` project to your solution.\n\n3. Reference the `FlexiMail` project in your main application project.\n\n## Usage\n\nTo use **FlexiMail**, follow the steps below:\n\n### Basic Example\n\n```csharp\nusing FlexiMail.Models.Configurations;\nusing FlexiMail.Models.Foundations.Bodies;\nusing FlexiMail.Models.Foundations.Messages;\n\nnamespace FlexiMail.Sample\n{\n    class Program\n    {\n        static async Task Main(string[] args)\n        {\n            var configurations = new ExchangeConfigurations\n            {\n                ClientId = \"your-client-id\",\n                ClientSecret = \"your-client-secret\",\n                TenantId = \"your-tenant-id\", \n                Authority = \"https://login.microsoftonline.com/{your-tenant-id}\",\n                Scopes = [\"https://outlook.office365.com/.default\"],\n                SmtpAddress = \"your-sender-email\"\n            };\n\n            var flexiMailClient = new FlexiMailClient(configurations);\n\n            var message = new FlexiMessage\n            {\n                To = [\"email@domain.com\"],\n                Cc = [\"other-email@domain.com\"],\n                Subject = \"Keep testing FlexiMail\",\n                Body = new FlexiBody\n                {\n                    Content = \"This is the message body. It can be a plain text or HTML.\",\n                    ContentType = BodyContentType.PlainText\n                }\n            };\n\n            await flexiMailClient.SendAndSaveCopyAsync(message);\n\n            Console.ReadKey();\n        }\n    }\n}\n```\n\n## Configuration\n\n**FlexiMail** can be configured to use different email service providers. Configure the desired provider in your app's\nconfiguration file:\n\n```json\n{\n   \"ExchangeConfigurations\": {\n      \"ClientId\": \"your-client-id\",\n      \"ClientSecret\": \"your-client-secret\",\n      \"TenantId\": \"your-tenant-id\",\n      \"SmtpAddress\": \"your-smtp-address\",\n      \"Sid\": \"your-sid\",\n      \"PrincipalName\": \"your-principal-name\",\n      \"Authority\": \"your-authority\",\n      \"Scopes\": [\n         \"https://outlook.office365.com/.default\"\n      ]\n   }\n}\n\n```\n\nNote: You can use `SmtpAddress`, `Sid` or `PrincipalName` in order to configure your exchange service.\n\n## Architecture\n\n**FlexiMail** is organized into the following components according\nto [The-Standard](https://github.com/hassanhabib/The-Standard):\n\n- **Brokers**: Handle communication with external email services.\n- **Models**: Contain the data structures used across the library.\n- **Services**: Core logic for sending and managing emails.\n- **Extensions**: Helper methods and extensions for common tasks.\n\nThe main class, `FlexiMailClient`, implements the `IFlexiMailClient` interface and serves as the entry point for most\noperations.\n\n## Contributing\n\nContributions to **FlexiMail** are welcome! Please follow these steps to contribute:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b users/your-github-id/YourFeature`).\n3. Commit your changes (`git commit -m 'Add new feature'`).\n4. Push to the branch (`git push origin users/your-github-id/YourFeature`).\n5. Open a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see\nthe [LICENSE](https://github.com/mabroukmahdhi/FlexiMail/blob/main/LICENSE) file for details.\n\n## Contact\nFor more information or questions, feel free to contact me at [contact@mahdhi.com](mailto:contact@mahdhi.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabroukmahdhi%2Ffleximail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmabroukmahdhi%2Ffleximail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabroukmahdhi%2Ffleximail/lists"}