# File lib/protocols/smtpclient.rb, line 185
185:                 def invoke_auth
186:                         if @args[:auth]
187:                                 if @args[:auth][:type] == :plain
188:                                         psw = @args[:auth][:password]
189:                                         if psw.respond_to?(:call)
190:                                                 psw = psw.call
191:                                         end
192:                                         str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp
193:                                         send_data "AUTH PLAIN #{str}\r\n"
194:                                         @responder = :receive_auth_response
195:                                 else
196:                                         return invoke_internal_error("unsupported auth type")
197:                                 end
198:                         else
199:                                 invoke_mail_from
200:                         end
201:                 end