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.



51
52
53
54
55
56
57
58
59
# File 'lib/mmmail.rb', line 51

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.



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

def auth_pass
  @auth_pass
end

#auth_typeObject

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



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

def auth_type
  @auth_type
end

#auth_userObject

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



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

def auth_user
  @auth_user
end

#enable_tlsObject

Enable TLS



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

def enable_tls
  @enable_tls
end

#hostObject

Set/get the SMTP host/port information



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

def host
  @host
end

#methodObject

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



44
45
46
# File 'lib/mmmail.rb', line 44

def method
  @method
end

#portObject

Set/get the SMTP host/port information



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

def port
  @port
end

#sendmail_binaryObject

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



47
48
49
# File 'lib/mmmail.rb', line 47

def sendmail_binary
  @sendmail_binary
end