Skip to content

Instantly share code, notes, and snippets.

@jstorimer
Created December 30, 2009 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstorimer/266123 to your computer and use it in GitHub Desktop.
Save jstorimer/266123 to your computer and use it in GitHub Desktop.
module OpenSRS
class APP < SockIt::Base
host 'admin.test.hostedemail.com'
port 4449
ssl true
attr_accessor :username, :password, :domain
def initialize(options = {})
# assign variables
super
end
after_connect :set_version, :authenticate
protected
def set_version
version(:ver => '3.4')
end
def authenticate
login(:login => username, :password => password, :domain => domain)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment