Module: Ronin::Network::SMTP

Defined in:
lib/ronin/network/smtp/smtp.rb,
lib/ronin/network/smtp/email.rb

Overview

Global settings for accessing STMP.

Defined Under Namespace

Classes: Email

Constant Summary collapse

DEFAULT_PORT =

Default SMTP port

25

Class Method Summary collapse

Class Method Details

.default_portInteger

Returns The default Ronin SMTP port.

Returns:

  • (Integer)

    The default Ronin SMTP port.



37
38
39
# File 'lib/ronin/network/smtp/smtp.rb', line 37

def SMTP.default_port
  @default_port ||= DEFAULT_PORT
end

.default_port=(port) ⇒ Object

Sets the default Ronin SMTP port.

Parameters:

  • port (Integer)

    The new default Ronin SMTP port.



49
50
51
# File 'lib/ronin/network/smtp/smtp.rb', line 49

def SMTP.default_port=(port)
  @default_port = port
end

.message(options = {}) {|email| ... } ⇒ String

Creates a properly formatted email.

Yields:

  • (email)

    If a block is given, it will be passed the newly created Email object.

Yield Parameters:

  • email (Ronin::Network::Email::SMTP)

    The new Email object.

Returns:

  • (String)

    Formatted SMTP email.

See Also:



70
71
72
# File 'lib/ronin/network/smtp/smtp.rb', line 70

def SMTP.message(options={},&block)
  Email.new(options,&block).to_s
end