seb5law
I am currently trying to connect to an in-house email server to download one email and process it.
I looked all around for usable packages for either POP3 or IMAP. I could not find any packages for IMAP neither for Elixir nor for Erlang that seem usable.
Is downloading an email too simple for a package or why is there no support so far for such an important functionality?
The only package in Elixir that addresses POP3 seems to be https://github.com/nico-amsterdam/pop3mail. I tried using it from within an Elixir project and I tried to call it via CLI:
mix run -e 'Pop3mail.CLI.main(["--username=<username>", "--password=<password>", "--max=10", "--server=example.com", "--port=110"])'
I tried several server configurations either with pop in the server address or without. With the above config, which I took from the description on Github, I always get a [error] connect_failed
Does anyone have an idea what the issue at hand could be assuming the credentials as well as the server address and port are correct (I checked them via telnet).
I am grateful for any suggestions.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
seb5law
Posting things here always helps your (or rather my) own awareness. One of the issues is that the mailserver does not use SSL…
Otherwise I would not be able to connect via telnet, obviously! So now the way to access the server within Elixir is:
Now I get a different error, but this seems to be server specific and not due to the connection or the package. I now get
{:error, ' login must use full email address\r\n'}. I will check with the admis what’s amiss, thank you anyways for this great forum!AstonJ
Sounds like you need
usernameto be the full email address which could be either something likename@domain.comor, depending on how your server is set up (prob via saslauthd)name.domainaccountnamewhere domainaccountname is the name of the linux user relating to that email/domain.seb5law
Thanks for the fast reply. I do actually use name@example.com notation:
NobbZ
Please do not use any email address or domain that is not owned by you. It might increase spam for that given address. If you do not want to waste one of your own please use example.com for the domain name. It does exist exactly for this purpose.
seb5law
The logs on the mail server imply, that part of the email address entered is removed somewhere. It seems like everything after including the “@” sign is missing. Any idea on why and how that happens? Do I need to escape some characters or use special quotation marks? To me it seems to be an issue with the epop implementation.
EDIT: I simply appended “@example” to the username and everything works fine:
I also filed an issue in order to request it be marked in the documentation that the username is shortened.