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).
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!
Sounds like you need username to be the full email address which could be either something like name@domain.com or, depending on how your server is set up (prob via saslauthd) name.domainaccountname where domainaccountname is the name of the linux user relating to that email/domain.
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.
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: