ActionMailer with SMTP or Sendmail

I’m deploying a JRuby 1.6.1 app with Rails 3. I’m using a very basic
ActionMailer setup.

I’m having one heck of a time getting a mail sent. I’ve tried straight
SMTP but I just get errors saying that AUTH type ‘PLAIN’ isn’t
supported:

Net::SMTPAuthenticationError in Imagery requestsController#create
504 5.3.3 AUTH mechanism PLAIN not available

My /var/log/maillog says:

Apr 19 12:51:16 rsac sendmail[2590]: p3JIpGRp002590: rsac [127.0.0.1]
did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

I’ve tried relaying through another server that I KNOW doesn’t have any
sort of authentication with the same error as I get using SMTP with
localhost

I don’t control the sendmail settings on the server but I can send an
email just fine from the command line (both using ‘mail’ and
/usr/sbin/sendmail)

When I put config.action_mailer.delivery_method = :sendmail in my
production.rb file, I no longer get errors… but the mail doesn’t go
anywhere. My /var/log/maillog says:

Apr 19 12:42:54 rsac sendmail[2324]: p3JIgsc9002324: from=, size=0,
class=0, nrcpts=0, [email protected]

Is anyone successfully doing this with JRuby/Rails/Tomcat?

On 4/19/11 11:55 AM, Jim W. wrote:

I’m deploying a JRuby 1.6.1 app with Rails 3. I’m using a very basic
ActionMailer setup.

I’m having one heck of a time getting a mail sent. I’ve tried straight
SMTP but I just get errors saying that AUTH type ‘PLAIN’ isn’t
supported:

A while back I started having problems getting ActionMailer to work
for me. I switched to using this gem http://rubygems.org/gems/mail

~Rob

Rob S. wrote in post #993825:

On 4/19/11 11:55 AM, Jim W. wrote:

I’m deploying a JRuby 1.6.1 app with Rails 3. I’m using a very basic
ActionMailer setup.

I’m having one heck of a time getting a mail sent. I’ve tried straight
SMTP but I just get errors saying that AUTH type ‘PLAIN’ isn’t
supported:

A while back I started having problems getting ActionMailer to work
for me. I switched to using this gem http://rubygems.org/gems/mail

~Rob

The generic mail gem? I think ActionMailer users that these days…

This is obviously some sort of issue with the SMTP config… oh well.

Thanks!

This looks to be a JRuby bug -
http://jira.codehaus.org/browse/JRUBY-6162

I added this person’s monkey patch to an initializer, and it solved my
problem.

Jim, any luck? Running into the same thing. I noticed that this isn’t
happening on OSX sendmail, just on my Ubuntu server.