Forum: JRuby ActionMailer with SMTP or Sendmail

Posted by Jim Wharton (nobleach)
on 2011-04-19 20:55
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, relay=tomcat@localhost

Is anyone successfully doing this with JRuby/Rails/Tomcat?
Posted by Rob Saul (Guest)
on 2011-04-19 21:52
(Received via mailing list)
On 4/19/11 11:55 AM, Jim Wharton 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
Posted by Jim Wharton (nobleach)
on 2011-04-19 22:49
Rob Saul wrote in post #993825:
> On 4/19/11 11:55 AM, Jim Wharton 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!
Posted by Edward A. (edward_a)
on 2012-01-11 17:39
Jim, any luck? Running into the same thing. I noticed that this isn't 
happening on OSX sendmail, just on my Ubuntu server.
Posted by Edward A. (edward_a)
on 2012-01-11 17:52
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.