Class: MmMail::Transport::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mmmail.rb

Overview

Configuration class for a MmMail::Transport

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Creates a new Config object set to send via SMTP on localhost:25 with no authentication.


44
45
46
47
48
49
50
51
52
# File 'lib/mmmail.rb', line 44

def initialize
  @method = :smtp # :sendmail
  @host = 'localhost'
  @port = 25
  @auth_type = nil # :plain, :login, :cram_md5
  @auth_user = nil
  @auth_pass = nil
  @sendmail_binary = 'sendmail'
end

Instance Attribute Details

#auth_passObject

Set/get the AUTH user/password when using SMTP transport.


34
35
36
# File 'lib/mmmail.rb', line 34

def auth_pass
  @auth_pass
end

#auth_typeObject

Set/get the authentication type (nil for none, :plain, :login or :cram_md5)


31
32
33
# File 'lib/mmmail.rb', line 31

def auth_type
  @auth_type
end

#auth_userObject

Set/get the AUTH user/password when using SMTP transport.


34
35
36
# File 'lib/mmmail.rb', line 34

def auth_user
  @auth_user
end

#hostObject

Set/get the SMTP host/port information


28
29
30
# File 'lib/mmmail.rb', line 28

def host
  @host
end

#methodObject

Set/get the email method. Allowed values are :smtp or :sendmail.


37
38
39
# File 'lib/mmmail.rb', line 37

def method
  @method
end

#portObject

Set/get the SMTP host/port information


28
29
30
# File 'lib/mmmail.rb', line 28

def port
  @port
end

#sendmail_binaryObject

Set/get the location of the sendmail binary on the system


40
41
42
# File 'lib/mmmail.rb', line 40

def sendmail_binary
  @sendmail_binary
end