Improve the interface of FoodsoftMailReceiver
This commit is contained in:
parent
e9bae618ed
commit
e017a1196e
3 changed files with 24 additions and 19 deletions
|
|
@ -17,7 +17,7 @@ class FoodsoftMailReceiver < MidiSmtpServer::Smtpd
|
|||
|
||||
@@registered_classes.each do |klass|
|
||||
klass_m = klass.regexp.match(m[:address])
|
||||
return klass.new.received klass_m, data if klass_m
|
||||
return klass.new(klass_m).received(data) if klass_m
|
||||
end
|
||||
|
||||
raise "invalid format for recipient"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue