{"id":22938428,"url":"https://github.com/jacraig/simplemail","last_synced_at":"2025-08-12T18:33:22.258Z","repository":{"id":141486584,"uuid":"74496071","full_name":"JaCraig/SimpleMail","owner":"JaCraig","description":"SimpleMail is a C# library designed to simplify sending emails. It provides a convenient and straightforward interface for sending email messages.","archived":false,"fork":false,"pushed_at":"2024-04-09T01:45:09.000Z","size":18500,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-09T02:42:36.109Z","etag":null,"topics":["email-sender","mailkit"],"latest_commit_sha":null,"homepage":"https://jacraig.github.io/SimpleMail/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JaCraig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-11-22T17:15:57.000Z","updated_at":"2024-04-15T02:32:25.761Z","dependencies_parsed_at":null,"dependency_job_id":"d9011aa1-1718-4d21-b7e1-d52a51cf6850","html_url":"https://github.com/JaCraig/SimpleMail","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2FSimpleMail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2FSimpleMail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2FSimpleMail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2FSimpleMail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaCraig","download_url":"https://codeload.github.com/JaCraig/SimpleMail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229700243,"owners_count":18109944,"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":["email-sender","mailkit"],"created_at":"2024-12-14T12:17:54.938Z","updated_at":"2025-08-12T18:33:22.247Z","avatar_url":"https://github.com/JaCraig.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleMail\r\n\r\n[![.NET Publish](https://github.com/JaCraig/SimpleMail/actions/workflows/dotnet-publish.yml/badge.svg)](https://github.com/JaCraig/SimpleMail/actions/workflows/dotnet-publish.yml)\r\n\r\nSimpleMail is a C# library designed to simplify sending emails. It provides a convenient and straightforward interface for sending email messages.\r\n\r\n## Features\r\n\r\n- Easy-to-use API for sending emails and attachments\r\n- Compatible with .NET 8 and above\r\n\r\n## Installation\r\n\r\nSimpleMail can be easily installed via NuGet:\r\n\r\n```\r\ndotnet add package SimpleMail\r\n```\r\n\r\nAlternatively, you can search for \"SimpleMail\" in the NuGet Package Manager UI and install it from there.\r\n\r\n## Getting Started\r\n\r\nTo use SimpleMail in your project, follow these simple steps:\r\n\r\n1. Add a reference to the SimpleMail namespace in your code file:\r\n\r\n```csharp\r\n    using SimpleMail;\r\n```\r\n\r\n2. Create an instance of the `EmailMessage` class:\r\n\r\n```csharp\r\n    // Create a new email\r\n    Email email = new Email\r\n    {\r\n        // Email address to send the email from\r\n        From = \"system@example.com\",\r\n        // Email address to send the email to\r\n        To = [\"someone@example.com\"],\r\n        // Subject of the email\r\n        Subject = \"Example Subject\",\r\n        // Body of the email\r\n        Body = \"Example Body\",\r\n        // Password of the email account\r\n        Password = \"password\",\r\n        // Email server to send the email\r\n        Server = \"smtp.example.com\",\r\n        // Username of the email account\r\n        UserName = \"username\",\r\n        // Port of the email server (default is 25)\r\n        Port = 587,\r\n        // Use SSL to encrypt the connection\r\n        UseSSL = true,\r\n        // Priority of the email\r\n        Priority = MimeKit.MessagePriority.Urgent,\r\n        // Reply-to address\r\n        ReplyTo = [\"replyto@example.com\"]\r\n    };\r\n```\r\n\r\nOr if you want to supply your own SmtpClient, you can do so. This is useful if you want to use a custom SmtpClient with specific settings:\r\n\r\n```csharp\r\n    // Create a new email\r\n    Email email = new Email(new SmtpClient())\r\n    {\r\n        // Email address to send the email from\r\n        From = \"system@example.com\",\r\n        ...\r\n    };\r\n```\r\n\r\nNote that the SmtpClient instance is not disposed of by SimpleMail, so you will need to dispose of it yourself when you are done with it.\r\n    \r\n\r\n3. Send the email:\r\n\r\n```csharp\r\nawait email.SendAsync().ConfigureAwait(false);\r\n```\r\n\r\nThat's it! You have successfully sent an email using SimpleMail.\r\n\r\n## Compatibility\r\n\r\nSimpleMail is compatible with .NET 8 and above.\r\n\r\n## Contributing\r\n\r\nWe welcome contributions to SimpleMail! If you encounter any issues, have suggestions for improvements, or would like to contribute new features, please feel free to submit a pull request.\r\n\r\n## License\r\n\r\nSimpleMail is released under the [Apache 2 License](https://github.com/JaCraig/SimpleMail/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacraig%2Fsimplemail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacraig%2Fsimplemail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacraig%2Fsimplemail/lists"}