Sha256: a8808d3862717337cde3ba528f4d7723b00ec3227b1d978d1b5234833c10b3cd

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

require 'nokogiri'
require 'faraday'
require 'resolv'

require "mail_autoconfig/version"
require "mail_autoconfig/client_config"
require "mail_autoconfig/server"
require "mail_autoconfig/email_address"

# Module to lookup mailbox autoconfiguration according to Thunderbird 
# spec (https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat)
# and guidelines (https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration)
module MailAutoconfig

  # The path for the locally stored Thunderbird ISPDB configurations
  # @return [String] absolute path to the ispdb data directory
  def self.local_ispdb_path
    File.expand_path(File.join(__FILE__, "../", "../", "ispdb_data"))
  end

  # The URL to the canonical SVN repository containing the Thunderbird IPSDB
  # @return [String] SVN repository location
  def self.ispdb_svn_url
    "http://svn.mozilla.org/mozillamessaging.com/sites/autoconfig.mozillamessaging.com/trunk"
  end

  # Fetch the client configuration for a given email address, if any.
  # Returns false if none found.
  # @param email [String] the email address to lookup
  # @return [MailAutoconfig::ClientConfig]
  def self.for_address(email)
    MailAutoconfig::EmailAddress.new(email).client_config
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mail_autoconfig-0.0.2 lib/mail_autoconfig.rb
mail_autoconfig-0.0.1 lib/mail_autoconfig.rb