Monday, June 27, 2011

Net::SMTPAuthenticationError (504 Authentication mechanism not supported.)

Reason:
Reason for this error is that your server is not supporting the authentication type which your are choosing.
e.g. :authentication => :plain is not supported.

Solution 1:
  • Try changing :authentication => :plain --------> :authentication => :login
Solution 2:
  1. Goto: Settings ->Protocols -> SMTP
  2. Go to tab "RFC Compliance"
  3. Check "Allow plain text authentication" (You can check one or more options according to your requirements)
  4. Now try sending an e-mail
Cheers

Keywords: Actionmailer, ruby,rails, smtp, 504, plain, login, email, hmail,

3 comments:

  1. Awesome!!! Worked like a charm! Was having great difficulty in configuring gophish and hmailserver. This helped

    ReplyDelete
  2. i am trying with sendblaster and hmailserver but its still showing the same error

    ReplyDelete
  3. It is because Google blocks gmail smtp sign-in attempts from apps which do not use modern security standards (mentioned on their support page). You can however, turn on/off this safety feature by going to the link below:

    Go to this link and select Turn On
    https://www.google.com/settings/security/lesssecureapps

    Moreover google block an ip when you try to send a email since a unusual location, so, you can unblock in the next link
    https://support.google.com/accounts/answer/6009563

    and clicked in

    accounts.google.com/DisplayUnlockCaptcha .


    ReplyDelete