{"id":45409207,"url":"https://github.com/nedimf/maildroid","last_synced_at":"2026-02-21T22:19:58.356Z","repository":{"id":42660324,"uuid":"201661490","full_name":"nedimf/maildroid","owner":"nedimf","description":"Maildroid is a small robust android library for sending emails using SMTP server","archived":false,"fork":false,"pushed_at":"2022-12-22T08:30:54.000Z","size":810,"stargazers_count":184,"open_issues_count":4,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-09T01:08:20.307Z","etag":null,"topics":["gradle","javamail-api","jitpack","kotlin","kotlin-android","robust-android-library","smtp-server"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nedimf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["nedimf"]}},"created_at":"2019-08-10T17:25:01.000Z","updated_at":"2024-03-26T08:23:59.000Z","dependencies_parsed_at":"2023-01-30T06:16:19.316Z","dependency_job_id":null,"html_url":"https://github.com/nedimf/maildroid","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/nedimf/maildroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedimf%2Fmaildroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedimf%2Fmaildroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedimf%2Fmaildroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedimf%2Fmaildroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nedimf","download_url":"https://codeload.github.com/nedimf/maildroid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nedimf%2Fmaildroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29695609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: 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":["gradle","javamail-api","jitpack","kotlin","kotlin-android","robust-android-library","smtp-server"],"created_at":"2026-02-21T22:19:57.650Z","updated_at":"2026-02-21T22:19:58.346Z","avatar_url":"https://github.com/nedimf.png","language":"Kotlin","funding_links":["https://github.com/sponsors/nedimf"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"http://www.nedimfakic.com\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nedimf/maildroid/master/maildroid.png\" alt=\"nedimfakic.com\" width=\"200\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  Maildroid\n  \u003cbr\u003e\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003e :tada: Maildroid is a small robust android library for sending emails using SMTP server :tada:\u003c/h4\u003e\n\u003cp align = \"center\"\u003e\n\u003ca href=\"https://android-arsenal.com/details/1/7818\"\u003e\u003cimg src=\"https://img.shields.io/badge/Android%20Arsenal-Maildroid-green.svg?style=flat-square\" border=\"0\" alt=\"Android Arsenal\"\u003e\u003c/a\u003e\t\n\u003c/p\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\n\u003cimg alt=\"JitPack\" src=\"https://img.shields.io/jitpack/v/github/nedimf/maildroid?color=%230000\u0026style=flat-square\"\u003e\n\u003ca href=\"https://www.codacy.com/app/nedx45/maildroid?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=nedimf/maildroid\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://api.codacy.com/project/badge/Grade/0e4b1eea545649cbbc459d0a54bf64af\"/\u003e\u003c/a\u003e\n \u003ca href=\"https://www.reddit.com/r/androiddev/comments/cotfeb/maildroid_new_email_library/\"\u003e\u003cimg alt=\"Reddit\" src=\"https://img.shields.io/badge/Reddit-androiddev-orange\"\u003e\u003c/a\u003e\n \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/nedim0x01?color=%23\u0026label=Follow\u0026style=social\"\u003e\n\t\n\t\n\u003c/p\u003e\n\n \n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#key-features\"\u003eKey Features\u003c/a\u003e •\n  \u003ca href=\"#add-to-your-project\"\u003eAdd to your project\u003c/a\u003e •\n  \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"#showcase\"\u003eShowcase\u003c/a\u003e •\n  \u003ca href=\"#development\"\u003eDevelopment\u003c/a\u003e •\n  \u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e\n\u003c/p\u003e\n\n``Latest active version is v0.1.1-release``\n\u003c/br\u003e\n```Library status: ACTIVE```\n\n![screenshot](https://raw.githubusercontent.com/nedimf/maildroid/master/show.gif)\nLibrary is using Oracle [Java Mail API](https://javaee.github.io/javamail/Android) to handle connections and sending emails.\n\n### Key Features\n\n- Sending emails using SMTP protocol :incoming_envelope:\n- Compatible with all smtp providers :tada:\n- Sending HTML/CSS styled emails :art:\n- Library is using Java Mail API that is well known as best library for sending emails :telescope:\n\n## Add to your project \nMaildroid is hosted on [JitPack](https://jitpack.io) and it's quite easy to integrate in to your project.\nMaildroid requires at least Android API level 19 [Android KitKat](https://en.wikipedia.org/wiki/Android_version_history#Android_4.4_KitKat_.28API_19.29) \n\nHow do you want to integrate Maildroid into your project\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eGradle\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\nAdd this to your root.gradle file  \n\n```gradle\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\nAdd dependency\n```gradle\n\ndependencies {\n\t        implementation 'com.github.nedimf:maildroid:v0.1.1-release'\n          }\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eMaven\u003c/b\u003e\u003c/summary\u003e\n\u003cp\u003e\n\nAdd the JitPack repository to your build file\n```\n\u003crepositories\u003e\n   \u003crepository\u003e\n       \u003cid\u003ejitpack.io\u003c/id\u003e\n       \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\nAdd the dependency\n\n```maven\n\n\u003cdependency\u003e\n     \u003cgroupId\u003ecom.github.nedimf\u003c/groupId\u003e\n     \u003cartifactId\u003emaildroid\u003c/artifactId\u003e\n     \u003cversion\u003ev0.1.1-release\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Add to your app\nAdding Maildroid to your app is straight forword process. Library is using Builder pattern to achieve flexebilty and easy to read wholesome implementation:\n\n```kotlin\n  MaildroidX.Builder()\n            .smtp(\"\")\n            .smtpUsername(\"\")\n            .smtpPassword(\"\")\n            .port(\"\")\n            .type(MaildroidXType.HTML)\n            .to(\"\")\n            .from(\"\")\n            .subject(\"\")\n            .body(\"\")\n            .attachment()\n\t    .isJavascriptDisabled()\n\t    .isisStartTLSEnabled()\n\t    //or\n\t    .attachments() //List\u003cString\u003e\n\t    .onCompleteCallback(object : MaildroidX.onCompleteCallback{\n\t\toverride val timeout: Long = 3000\n\t\toverride fun onSuccess() {\n  \t\t\tLog.d(\"MaildroidX\",  \"SUCCESS\")\t\t\t  \n\t\t}\n\t\toverride fun onFail(errorMessage: String) {\n\t\t\t Log.d(\"MaildroidX\",  \"FAIL\")\n\t\t}\n\t     })\n\t     .mail()\n```\n\n**DSL implementation:**\n\n```kotlin\nsendEmail {\n      smtp(\"smtp.mailtrap.io\")\n      smtpUsername(\"username\")\n      smtpPassword(\"password\")\n      smtpAuthentication(true)\n      port(\"2525\")\n      type(MaildroidXType.HTML)\n      to(\"johndoe@email.com\")\n      from(\"janedoen@email.com\")\n      subject(\"Hello!\")\n      body(\"email body\")\n      attachment(\"path_to_file/file.txt\") \n      //or\n      attachments() //List\u003cString\u003e\n      callback {\n          timeOut(3000)\n          onSuccess {\n              Log.d(\"MaildroidX\",  \"SUCCESS\")\n          }\n          onFail {\n              Log.d(\"MaildroidX\",  \"FAIL\")\n          }\n      }\n }\n```\n\n### Documentation\n***\n#### Documentation for version v.0.0.4\n- context\n\u003e Constructor that is used to declare context **(Context)** **DEPRECATED**\n- smtp\n\u003e Constructor that is used to declare SMTP server your will use **(String)** \n- smtpUsername\n\u003e Constructor that is used to declare SMTP username of your server  **(String)** \n- smtpPassword\n\u003e Constructor that is used to declare SMTP password of your server  **(String)** \n- smtpAuthentication \n\u003e Constructor that is used to declare if your server needs authentication (DEPRECETED) **(Boolean)** \n- port\n\u003e Constructor that is used to declare port of your server **(String)**\n- type\n\u003e Constructor that is used to declare type of your content  **(MaildroidXType)**\n  \u003e- MaildroidXType.HTML \n  \u003e- MaildroidXType.PLAIN\n- to \n\u003e Constructor that is used to declare internet adress where email will be send  **(String)** \n- from\n\u003e Constructor that is used to declare internet adress witch email is sent from. It s fully supporting @no_replay or not existent email adresses **(String)** \n- subject \n\u003e  Constructor that is used to declare subject of email your sending **(String)** \n- body\n\u003e Constructor that is used to declare body of email your sending **(String)** \n- isJavascriptDisabled\n\u003e Constructor that is used to check if javascript has to be disabled in body of an email **(Boolean)**\n- isStartTLSEnabled\n\u003e Constructor that is used to enable STARTLS for certain SMTP servers **(Boolean)**\n- attachment\n\u003e Constructor that is used to declare attachment of email in case that ones need to be added **(String)** \n- attachments \n\u003e Constructor that is used to declare unlimited number attachments into email **(List\u003cString\u003e)**\n- onCompleteCallback ()\n\u003e When sending email is done, call this constructor to handle further actions in your app. \n\u003e Constructor is made out of two functions\n\u003e- onSuccess() that handles when email is succssfully sent\n\u003e - onFail() that handles any error in sending email ``from version v0.0.3 it containes errorMessage (String)``\n\u003e - timeout value that is used to predict timout how long will it take for email to be sent defualt is 3 seconds **(Long)** \n- mail () \n\u003e Function that is called when email is ready to be sent\n\n#### Errors\n***\nMaildroid is handling small amount of exceptions.\n\n**IllegalArgumentException** \n\u003cbr\u003e\nThese exceptions are called after an error in checking if mandatory fields are not existent.\n- ``` MaildroidX detected that you didn't pass [smtp] value in to the builder! ```\n- ``` MaildroidX detected that you didn't pass [smtpAuthentication] value to the builder! ```\n- ``` MaildroidX detected that you didn't pass [port] value to the builder! ```\n\n**AuthenticationFailedException**\n\u003cbr\u003e\nThese exceptions are called when username or password on SMTP server is not correct, or address of SMTP server is not existent.\n- ``` MaildroidX detected that you didn't pass [smtpUsername] or [smtpPassword] to the builder! ```\n- ```MaildroidX detected that you didn't pass [smtpUsername] or [smtpPassword] to the builder!```\n\n**Other**\n- ``` SMTPAddressFailedException ```\n\u003e Thrown when mail can't be sent\n- ``` MessagingException ```\n\u003e Thrown when there is problem with message \n- ``` IOException ```\n\u003e File in attachment not found or not existent\n\n#### Proguard\n\n```\n-keep class org.apache.** { *; }\n-dontwarn org.apache.**\n\n-keep class com.sun.mail.** { *; }\n-dontwarn com.sun.mail.**\n\n-keep class java.beans.** { *; }\n-dontwarn java.beans.**\n```\n\n## Development\nWe love open source :hearts: \u003cbr\u003e\nContributing to our project is really easy if you follow these steps.\n\n- Add `` maildroidx `` to your machine\n  - Download maildroid folder\n  - Open it on your machine using your favourite IDE (Android Studio / InteliJ ) is recomended\n\n\n- Contribution :tada:\n  - Fork the repository\n  - Create new branch ``` git checkout -b maildroidx-community-features ```\n  - Add your feature or other changes to files\n  - Commit your changes ``` git commit -m 'New feature' ```\n  - Push to the branch ``` git push origin maildroidx-community-features ```\n  - Create a pull request\n\n### Bug :bug:\n***\nWe are trying to make this library as bug free as possible ,but as you know some bugs can occure. If you find bug or typo in our library be free to open issue and report it.\n- Open issue \n  - bug\n   \u003e **Explaining bug is most important thing** please use standard english language and don't forget to share your debug log\n  - typo\n\n### Feature Request\n***\nWe strive to make `` maildroid `` best mailing library out there. We have ideas to add, but we would also like to hear from you.\n- Open issue\n  - fetaure\n\n### Built with :muscle:\n***\n- **Kotlin** \n- **Java Mail API / Jakarta Mail API  by Eclipse foundation**\n\n### TODO\n***\n- [Maildroid project board](https://github.com/nedimf/maildroid/projects/1)\n\n## Team\n\n![](https://avatars1.githubusercontent.com/u/24845593?s=150\u0026v=4)    |   ![](https://avatars1.githubusercontent.com/u/9919?s=150\u0026v=4)\n:-------------------------:|:-------------------------:\n[nedimf](https://github.com/nedimf) | [javier-moreno](https://github.com/javier-moreno)\n\nYour name here :hearts:\n\n\n### Motivation\n\nMaildroid was born from the frustration of implementing a good emailing solution I had while developing a few client apps. I had to do many hours of unneeded work to make some emailing functions work using old libraries. Those libraries were limited to one SMTP server and because of that frustration ``Maildroid`` was born..\n\n## Showcase\n- [MacroDroid](https://play.google.com/store/apps/details?id=com.arlosoft.macrodroid\u0026hl=en_US) is using this library (check issue [#17](https://github.com/nedimf/maildroid/issues/17) for proof)\n\n## FAQ \n\n[![HitCount](http://hits.dwyl.io/nedimf/maildroid.svg)](http://hits.dwyl.io/nedimf/maildroid)\n[![Gitter](https://badges.gitter.im/maildroid/community.svg)](https://gitter.im/maildroid/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/nedimf)\n\n- How to use Google `` gmail `` smtp server \n\u003e As stated above every smtp server that uses SSL should be supported.\u003cbr\u003eTutorial how to use ``smtp.gmail.com``: \u003cbr\u003e\n  - If you choose this SMTP server we suggest making brand new account and enabling **less secure apps** in settings. [Google support link](https://support.google.com/accounts/answer010255?hl=en)\n  - **``` smtp.(\"smtp.gmail.com\")  ```**\n  - **``` smtpUsername.(\"\")  ```** your gmail email adress\n  - **``` smtpPassword.(\"\")  ```** your gmail password\n  - **``` smtpPort.(\"465\")  ```** gmail SSL port\n\n- How to test sending emails,but not to affect client\n\u003e Maildroid works great with [mailtrap.io](https://mailtrap.io). They limit 50 message per inbox.Inbox can be erase at any time what it makes it one of the best solution for developers.\n\n- Do this library save any of those data to external parties or servers?\n\u003e Maildroid is open source and it **DOES NOT** save ANY data to extarnal servers or parties.\n\n- Do this library needs AndroidX to run properly?\n\u003e Yes,project needs to be compatible with AndroidX [QUICK GUIDE](https://www.youtube.com/watch?v=0FZ_eUIsLTg)\n\nThis part will grow more over time as question are posted.\n\n### License \nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n### Designer credits\nIcon made by [Designer](https://www.flaticon.com/authors/kiranshastry) \u0026 [Freepik](https://www.flaticon.com/authors/freepik) from [flaticon](https://www.flaticon.com/authors/freepik)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnedimf%2Fmaildroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnedimf%2Fmaildroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnedimf%2Fmaildroid/lists"}