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.



47
48
49
50
51
52
53
54
55
# File 'lib/mmmail.rb', line 47

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.



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

def auth_pass
  @auth_pass
end

#auth_typeObject

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



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

def auth_type
  @auth_type
end

#auth_userObject

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



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

def auth_user
  @auth_user
end

#hostObject

Set/get the SMTP host/port information



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

def host
  @host
end

#methodObject

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



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

def method
  @method
end

#portObject

Set/get the SMTP host/port information



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

def port
  @port
end

#sendmail_binaryObject

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



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

def sendmail_binary
  @sendmail_binary
end