antfarm
How to build an IMAP Email client with Elixir?
I want to build an IMAP Email client that can connect to Gmail. What library would you suggest?
I tried using Mailroom, but cannot even get it to connect to my account.
iex> {result, client} = Mailroom.IMAP.connect("imap.gmail.com", "me@example.com", "PASSWORD", ssl: true)
{:error, :unable_to_connect}
Any help is appreciated, thanks.
Most Liked
D4no0
I am not against hardening of security, but when manual review comes into play, you know there is a bias involved.
Here is the line that worries me:
If your public application uses scopes that permit access to certain user data, it must complete a verification process. If you see unverified app on the screen when testing your application, you must submit a verification request to remove it. Find out more about unverified apps and get answers to frequently asked questions about app verification in the Help Center.
This is the same story as google play apps requires and it will most probably only get worse the next years.
maennchen
I don’t know if there’s a library that already does this, but it should be relatively simple to implement:
- Setup an OAuth lib and obtain a token
- Adapt the IMAP implementation to support the AUTHENTICATE command instead of the default LOGIN command.
Here’s an example imap implementation in PHP:
https://github.com/pluginsGLPI/oauthimap/blob/5e5cead36246e5c9c46d6a9f403769aa458ebfa4/inc/imap/imapoauthprotocol.class.php#L147-L153
maennchen
(Also see the Google Docs about the AUTHENTICATE command: OAuth 2.0 Mechanism | Gmail | Google for Developers)
Last Post!
princemaple
Hi, you might want to give this a go… my new little lib
https://github.com/princemaple/blop
EDIT: I’ve tested with my own gmail account. With app password (the less secure thingy), I managed to access my emails with blop v0.1.4
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









