Class Net::SMTP
In: lib/more/facets/net/smtp_tls.rb
Parent: Object

Methods

start   start  

External Aliases

start -> tls_old_start
quit -> tls_old_quit

Public Class methods

[Source]

# File lib/more/facets/net/smtp_tls.rb, line 44
  def self.start(address, port=nil, helo='localhost.localdomain', user=nil, secret=nil, authtype=nil, use_tls=false, &block) # :yield: smtp
    new(address, port).start(helo, user, secret, authtype, use_tls, &block)
  end

Public Instance methods

[Source]

# File lib/more/facets/net/smtp_tls.rb, line 50
  def start(helo='localhost.localdomain', user=nil, secret=nil, authtype=nil, use_tls=false) # :yield: smtp
    start_method = use_tls ? :do_tls_start : :do_start
    if block_given?
      begin
        send start_method, helo, user, secret, authtype
        return yield(self)
      ensure
        do_finish
      end
    else
      send start_method, helo, user, secret, authtype
      return self
    end
  end

[Validate]