Skip to content

Commit

Permalink
Merge pull request #141 from clairton/fixture/basicauth
Browse files Browse the repository at this point in the history
fix postback username and password to delivery_username and delivery_…
  • Loading branch information
tpitale committed May 2, 2022
2 parents 8ebd386 + 5a79880 commit 14e5bcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ And finally, configure MailRoom to use the postback configuration with the optio
:delivery_method: postback
:delivery_options:
:delivery_url: https://example.com/rails/action_mailbox/relay/inbound_emails
:delivery_username: actionmailbox
:delivery_password: <INGRESS_PASSWORD>
:username: actionmailbox
:password: <INGRESS_PASSWORD>
```

## Receiving `postback` in Rails ##
Expand Down
8 changes: 6 additions & 2 deletions lib/mail_room/delivery/postback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ def initialize(mailbox)

jwt = initialize_jwt(mailbox.delivery_options)

username = mailbox.delivery_options[:username]
password = mailbox.delivery_options[:password]
username =
mailbox.delivery_options[:username] ||
mailbox.delivery_options[:delivery_username]
password =
mailbox.delivery_options[:password] ||
mailbox.delivery_options[:delivery_password]

logger = mailbox.logger

Expand Down

0 comments on commit 14e5bcc

Please sign in to comment.