-
Notifications
You must be signed in to change notification settings - Fork 1
Added pop3 mailer and tools #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
d4rk5eed
commented
Jan 30, 2018
- Created Email.Protocol.Pop3 for pop3 protocol
- Created Email.Protocol.Pop3.Mock for testing
- Created Email.Protocol.Pop3.Mock for testing
lib/agala_email.ex
Outdated
| bot_params | ||
| Map.put( | ||
| bot_params, :private, %{ | ||
| mail_fetcher_module: (Mix.env() == :test &&@pop3_mock || @pop3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&&@pop3_mock - это какой-то особый синтаксис? непонятно немного
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&&@pop3_mock -> && @pop3_mock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Какая-то императивная магия
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вика поправила
lib/agala_email_receiver.ex
Outdated
| end) | ||
| end | ||
|
|
||
| defp mail_options(%BotParams{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем этот метод вообще? Какой-то копипаст... Можно завернуть в provider_params.mail_params, или сделать Map.take...
mix.exs
Outdated
| {:credo, "~> 0.8", only: [:dev, :test]} | ||
| {:credo, "~> 0.8", only: [:dev, :test]}, | ||
| {:pop3mail, "~> 1.3"}, | ||
| {:erlpop, github: "nico-amsterdam/erlpop"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 либы? зачем
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Разобрался, но хрень какая-то)
email helpers
fix helper module name
fetch update interval from config
Add pop3 mailer
Delete and quit
add missing methods to pop3_mock
|
один из тестов сейчас падает |
Add pop3 mailer
Merge pull request #2 from agalaframework/add-pop3-mailer
|
Теперь тесты проходят |
Add email reply
Add pop3 mailer
Logging on get updates