Guest User

Untitled

a guest
Apr 26th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. module OpenSRS
  2. class APP < SockIt::Base
  3. host 'admin.test.hostedemail.com'
  4. port 4449
  5. ssl true
  6.  
  7. attr_accessor :username, :password, :domain
  8.  
  9. def initialize(options = {})
  10. # assign variables
  11.  
  12. super
  13. end
  14.  
  15. after_connect :set_version, :authenticate
  16.  
  17. protected
  18. def set_version
  19. version(:ver => '3.4')
  20. end
  21.  
  22. def authenticate
  23. login(:login => username, :password => password, :domain => domain)
  24. end
  25. end
  26. end
Add Comment
Please, Sign In to add comment