method

send0

ruby latest stable - Class: Net::SMTP

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_6_287) is shown here.

send0( from_addr, to_addrs )
private

No documentation available.

# File lib/net/smtp.rb, line 533
    def send0( from_addr, to_addrs )
      raise IOError, 'closed session' unless @socket
      raise ArgumentError, 'mail destination not given' if to_addrs.empty?
      if $SAFE > 0
        raise SecurityError, 'tainted from_addr' if from_addr.tainted?
        to_addrs.each do |to| 
          raise SecurityError, 'tainted to_addr' if to.tainted?
        end
      end

      mailfrom from_addr
      to_addrs.each do |to|
        rcptto to
      end
      res = critical {
        check_response(get_response('DATA'), true)
        yield
        recv_response()
      }
      check_response(res)
    end