Dhepthi
Dhepthi

Reputation: 453

AUTH not available (Net::SMTPAuthenticationError) in Ruby 1.9.2

I am trying to send mail from MS exchange server but I am getting error as

`check_auth_response': 503 #5.3.3 AUTH not available (Net::SMTPAuthenticationError)

The code I used to send mail is

require 'net/smtp'
require 'mail'

smtp = Net::SMTP.new('mycompanydomain',25)
smtp.start('mycompanydomain', '[email protected]', 'pwd',:plain) do |smtp|
  # code to send mail
end

Note: It works fine with Gmail account but fails for company account. Any help would be useful.

Upvotes: 5

Views: 5776

Answers (1)

Michael Papile
Michael Papile

Reputation: 6856

Are you sure that your server supports AUTH? You can find out by:

If the connection is not encrypted:

telnet mycompanydomain 25
ehlo testing

It should respond with something that that says AUTH PLAIN in it. If it doesn't, your server does not support plain auth, it may list other auth methods. You may need to set it to one of them.

More information http://qmail.jms1.net/test-auth.shtml

Upvotes: 1

Related Questions