Class: MailSandbox::Server
- Inherits:
-
EventMachine::Protocols::SmtpServer
- Object
- EventMachine::Protocols::SmtpServer
- MailSandbox::Server
- Defined in:
- lib/mail_sandbox/server.rb
Instance Method Summary collapse
- #message ⇒ Object
- #process_data_line(ln) ⇒ Object
- #receive_message ⇒ Object
- #receive_plain_auth(user, password) ⇒ Object
- #receive_recipient(recipient) ⇒ Object
- #receive_sender(sender) ⇒ Object
Instance Method Details
#message ⇒ Object
33 34 35 |
# File 'lib/mail_sandbox/server.rb', line 33 def @message ||= MailSandbox::Message.new end |
#process_data_line(ln) ⇒ Object
27 28 29 30 31 |
# File 'lib/mail_sandbox/server.rb', line 27 def process_data_line ln super ln .data << ln true end |
#receive_message ⇒ Object
21 22 23 24 25 |
# File 'lib/mail_sandbox/server.rb', line 21 def .completed_at = Time.now MailSandbox.subscriber.notify() true end |
#receive_plain_auth(user, password) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/mail_sandbox/server.rb', line 4 def receive_plain_auth(user, password) .user = user .password = password true end |
#receive_recipient(recipient) ⇒ Object
16 17 18 19 |
# File 'lib/mail_sandbox/server.rb', line 16 def receive_recipient(recipient) .recipient = recipient true end |
#receive_sender(sender) ⇒ Object
11 12 13 14 |
# File 'lib/mail_sandbox/server.rb', line 11 def receive_sender(sender) .sender = sender true end |