# File lib/protocols/smtpclient.rb, line 208 208: def invoke_auth 209: if @args[:auth] 210: if @args[:auth][:type] == :plain 211: psw = @args[:auth][:password] 212: if psw.respond_to?(:call) 213: psw = psw.call 214: end 215: #str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp 216: str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").chomp 217: send_data "AUTH PLAIN #{str}\r\n" 218: @responder = :receive_auth_response 219: else 220: return invoke_internal_error("unsupported auth type") 221: end 222: else 223: invoke_mail_from 224: end 225: end