Failing to send mails to msmtp mail server using IO.popen. For instance
impossible to send mails to GMail using msmtp. This is a regression.
--------------------------------------------------------------------------------------------------------------------------------------------
Key: JRUBY-1878
URL: http://jira.codehaus.org/browse/JRUBY-1878
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.x
Environment: JRuby head. Two weeks ago or now January the 4th. Ubuntu
Linux, java version "1.6.0_10-ea"
Reporter: Raphael Valyi
Assignee: Thomas E Enebo
Priority: Critical
Unless you are able to reduce the test by inspecting what is sent by IO.popen,
you need to set an msmtp server, for instance to send mails to your gmail
account (don't you have a gmail account?). This should be simple.
so apt-get install msmtp.
Then make it work for gmail: edit or creat the .msmtprc file in your home
directory and write inside:
account gmail
host smtp.gmail.com
auth on
user [EMAIL PROTECTED]
password your_password
tls on
tls_starttls on
tls_certcheck off
from [EMAIL PROTECTED]
maildomain gmail.com
Then try this in MRI and then in JRuby (also chekc your mail box):
s = "Date: Fri, 4 Jan 2008 01:00:05 +0100
From: [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Subject: How good is JRuby?
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Look at your mail box to discover"
IO.popen("/usr/bin/msmtp -t -C /home/rvalyi/.msmtprc -a gmail --", "w") do |sm|
sm.puts(s.gsub(/\r/, ''))
sm.flush
end
if $? != 0
puts "failed to send mail errno #{$? >> 8}"
end
In MRI you should get nil and receive the e-mail while in JRuby, you would get
no email and that error line in your terminal:
failed to send mail errno 143
Ant idea what is going wrong?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email