Results for: "strip"

true if the POP3 session has started.

Starts a POP3 session.

When called with block, gives a POP3 object to the block and closes the session after block call finishes.

This method raises a POPAuthenticationError if authentication fails.

No documentation available
No documentation available
No documentation available

Returns truth value if this object uses STARTTLS. If this object always uses STARTTLS, returns :always. If this object uses STARTTLS when the server support TLS, returns :auto.

Creates a new Net::SMTP object and connects to the server.

This method is equivalent to:

Net::SMTP.new(address, port).start(helo_domain, account, password, authtype)

Example

Net::SMTP.start('your.smtp.server') do |smtp|
  smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
end

Block Usage

If called with a block, the newly-opened Net::SMTP object is yielded to the block, and automatically closed when the block finishes. If called without a block, the newly-opened Net::SMTP object is returned to the caller, and it is the caller’s responsibility to close it when finished.

Parameters

address is the hostname or ip address of your smtp server.

port is the port to connect to; it defaults to port 25.

helo is the HELO domain provided by the client to the server (see overview comments); it defaults to ‘localhost’.

The remaining arguments are used for SMTP authentication, if required or desired. user is the account name; secret is your password or other authentication token; and authtype is the authentication type, one of :plain, :login, or :cram_md5. See the discussion of SMTP Authentication in the overview notes.

Errors

This method may raise:

true if the SMTP session has been started.

Opens a TCP connection and starts the SMTP session.

Parameters

helo is the HELO domain that you’ll dispatch mails from; see the discussion in the overview notes.

If both of user and secret are given, SMTP authentication will be attempted using the AUTH command. authtype specifies the type of authentication to attempt; it must be one of :login, :plain, and :cram_md5. See the notes on SMTP Authentication in the overview.

Block Usage

When this methods is called with a block, the newly-started SMTP object is yielded to the block, and automatically closed after the block call finishes. Otherwise, it is the caller’s responsibility to close the session when finished.

Example

This is very similar to the class method SMTP.start.

require 'net/smtp'
smtp = Net::SMTP.new('smtp.mail.server', 25)
smtp.start(helo_domain, account, password, authtype) do |smtp|
  smtp.send_message msgstr, 'from@example.com', ['dest@example.com']
end

The primary use of this method (as opposed to SMTP.start) is probably to set debugging (set_debug_output) or ESMTP (esmtp=), which must be done before the session is started.

Errors

If session has already been started, an IOError will be raised.

This method may raise:

No documentation available
No documentation available

Produces the summary text. Each line of the summary is yielded to the block (without newline).

sdone

Already summarized short style options keyed hash.

ldone

Already summarized long style options keyed hash.

width

Width of left side (option part). In other words, the right side (description part) starts after width columns.

max

Maximum width of left side -> the options are filled within max columns.

indent

Prefix string indents all summarized lines.

Creates the summary table, passing each line to the block (without newline). The arguments args are passed along to the summarize method which is called on every option.

This is used as a predicate, and ought to be called first.

Look up the typeclass DNS resource of name.

name must be a Resolv::DNS::Name or a String.

typeclass should be one of the following:

Returned resource is represented as a Resolv::DNS::Resource instance, i.e. Resolv::DNS::Resource::IN::A.

Looks up all typeclass DNS resources for name. See getresource for argument details.

Write out exactly what we got in.

Writes this attribute (EG, puts ‘key=“value”’ to the output)

DEPRECATED

See the rexml/formatters package

Generates XML output of this object

output

Where to write the string. Defaults to $stdout

indent

The amount to indent this node by

transitive

Ignored

ie_hack

Ignored

Examples

c = CData.new( " Some text " )
c.write( $stdout )     #->  <![CDATA[ Some text ]]>

DEPRECATED

See REXML::Formatters

output

Where to write the string

indent

An integer. If -1, no indenting will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount.

transitive

Ignored by this class. The contents of comments are never modified.

ie_hack

Needed for conformity to the child API, but not used by this class.

No documentation available
output

Where to write the string

indent

An integer. If -1, no indentation will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount.

transitive

Ignored

ie_hack

Ignored

This method retrieves the system identifier identifying the document’s DTD

Method contributed by Henrik Martensson

DEPRECATED

See REXML::Formatters

No documentation available
Search took: 3ms  ·  Total Results: 1841