{"id":1672,"url":"https://github.com/snipsco/Postal","last_synced_at":"2025-08-06T14:31:57.906Z","repository":{"id":40589276,"uuid":"59107214","full_name":"snipsco/Postal","owner":"snipsco","description":"A Swift framework for working with emails","archived":false,"fork":false,"pushed_at":"2019-05-22T13:44:32.000Z","size":40482,"stargazers_count":653,"open_issues_count":29,"forks_count":82,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-09-16T13:31:37.483Z","etag":null,"topics":["mail-tech","mailcore","postal","swift","swift-framework"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/snipsco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-18T10:51:25.000Z","updated_at":"2024-09-15T14:36:27.000Z","dependencies_parsed_at":"2022-08-09T23:50:27.668Z","dependency_job_id":null,"html_url":"https://github.com/snipsco/Postal","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2FPostal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2FPostal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2FPostal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snipsco%2FPostal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snipsco","download_url":"https://codeload.github.com/snipsco/Postal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905555,"owners_count":17989783,"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":["mail-tech","mailcore","postal","swift","swift-framework"],"created_at":"2024-01-05T20:15:52.941Z","updated_at":"2024-12-09T14:31:23.667Z","avatar_url":"https://github.com/snipsco.png","language":"Swift","readme":"\r\n![](Documentation/logo.jpg)\r\n\r\n[![Build Status](https://travis-ci.org/snipsco/Postal.svg?branch=master)](https://travis-ci.org/snipsco/Postal)\r\n[![Carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\r\n[![Pods](https://img.shields.io/badge/Pods-compatible-4BC51D.svg?style=flat)](https://cocoapods.org/)\r\n[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org/)\r\n![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS-lightgrey.svg?style=flat)\r\n\r\nPostal is a swift framework providing simple access to common email providers.\r\n\r\n## Example\r\n\r\n### Connect\r\n\r\n```swift\r\nlet postal = Postal(configuration: .icloud(login: \"myemail@icloud.com\", password: \"mypassword\"))\r\npostal.connect { result in\r\n    switch result {\r\n    case .success:\r\n        print(\"success\")\r\n    case .failure(let error):\r\n        print(\"error: \\(error)\")\r\n    }\r\n}\r\n```\r\n\r\n### Search\r\n\r\n```swift\r\nlet filter = .subject(value: \"Foobar\") \u0026\u0026 .from(value: \"foo@bar.com\")\r\npostal.search(\"INBOX\", filter: filter) { result in\r\n    switch result {\r\n    case .success(let indexes):\r\n        print(\"success: \\(indexes)\")\r\n    case .failure(let error):\r\n        print(\"error: \\(error)\")\r\n    }\r\n}\r\n```\r\n\r\n### Fetch\r\n\r\n```swift\r\nlet indexset = NSIndexSet(index: 42)\r\npostal.fetchMessages(\"INBOX\", uids: indexset, flags: [ .headers ], onMessage: { email in\r\n    print(\"new email received: \\(email)\")\r\n}, onComplete: error in\r\n    if error = error {\r\n        print(\"an error occured: \\(error)\")\r\n    }\r\n}\r\n```\r\n\r\n### Want to debug your IMAP session ?\r\n\r\n```swift\r\npostal.logger = { log in\r\n    print(log)\r\n}\r\n```\r\n\r\n### What about Mailcore ?\r\n\r\nPostal does not address the same goal as MailCore. You can take a look at our thoughts in the [TechnicalNotes][] document.\r\n\r\n### Provider quirks\r\n\r\nEmail protocol is standardized. However providers implementations often provides extension or variations of these standards.\r\nWe tried to build a document to synthesize working around these variations here: [ProviderQuirks][].\r\n\r\n### Contributing\r\n\r\nPostal has been a great effort and we could really use your help on many areas:\r\n\r\n- Finding and reporting bugs.\r\n- New feature suggestions.\r\n- Answering questions on issues.\r\n- Documentation improvements.\r\n- Reviewing pull requests.\r\n- Fixing bugs/new features.\r\n- Improving tests.\r\n- Contribute to elaborate the [Roadmap][].\r\n\r\nIf any of that sounds cool to you, please send a pull request!\r\n\r\nPlease note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms that you can find here: [CodeOfConduct][].\r\n\r\n## Requirements\r\n\r\n- Xcode 10\r\n- OS X 10.10 or later\r\n- iOS 8.0 or later\r\n\r\n## Installation\r\n\r\n### Carthage\r\n\r\nPostal is [Carthage](https://github.com/Carthage/Carthage) compatible.\r\n\r\n- Add `github \"snipsco/Postal\"` to your Cartfile.\r\n- Run `carthage update`.\r\n\r\n### CocoaPods\r\n\r\nPostal also can be used by [CocoaPods](https://cocoapods.org/).\r\n\r\n- Add the followings to your Podfile:\r\n\r\n```ruby\r\nuse_frameworks!\r\npod 'Postal'\r\n```\r\n\r\n- Run `pod install`. \r\n\r\n### Manual\r\n\r\n1. Add the Postal repository as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) of your application’s repository.\r\n\t\r\n```bash\r\ngit submodule add https://github.com/snipsco/Postal.git\r\ngit submodule update --init --recursive\r\n```\r\n\r\n1. Drag and drop `Postal.xcodeproj` into your application’s Xcode project or workspace.\r\n1. On the “General” tab of your application target’s settings, add `Postal.framework` to the “Embedded Binaries” section.\r\n1. If your application target does not contain Swift code at all, you should also set the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting to “Yes”.\r\n\r\n## License\r\n\r\nPostal is released under the [MIT License](LICENCE.md).\r\n\r\n[Roadmap]: Documentation/Roadmap.md\r\n[TechnicalNotes]: Documentation/TechnicalNotes.md\r\n[ProviderQuirks]: Documentation/ProviderQuirks.md\r\n[CodeOfConduct]: Documentation/CodeOfConduct.md\r\n","funding_links":[],"categories":["Networking","Libs","Swift","Network [🔝](#readme)"],"sub_categories":["Email","Network","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnipsco%2FPostal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnipsco%2FPostal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnipsco%2FPostal/lists"}