Erwin
2011-Dec-12 14:52 UTC
Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production
I don''t know how to get more info about this issue on my remote server
( Linux/Debian6 - Qmail)
localhost testing is fine
, so my class UserMailer < ActionMailer::Base is rendering correctly
the email ( checked in the development log)
now, testing the remote SMTP server , via the production console,
using :
ActionMailer::Base.smtp_settings = {:address =>
"mail.mydomain.com",:port => 587,:domain =>
"mydomain.com",:authentication => :login, :user_name =>
"myself-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org",:password =>
"xxxxxxxxxxxx",:enable_starttls_auto => false}
class MyMailer < ActionMailer::Base
def test_email
@recipients = "myself-BUHhN+a2lJ4@public.gmane.org"
@from = "noreply-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org"
@subject = "this is a subject"
@body = "this is the body"
end
end
>> MyMailer::deliver_test_email is delivering fine this test email
I used these smtp_settings, in a specific initializer file :
config/initializers/mail.rb
but then I get the Errno::ECONNREFUSED in production log, right after
the email rendering ...
how can I check what''s wrong ? the production log doesn''t
give me
enough info ...
thanks for your feedback .. I''m lost in translation ...
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Erwin
2011-Dec-12 15:23 UTC
Re: Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production
[SOLVED] but don''t know why ... I changed :address => "mail.mydomain.com" to :address => "localhost" and it''s now correctly sending the email... but why the :address => "mail.mydomain.com" was running fine in the rails console ?? and not when the app is running ? any clue ? erwin On Dec 12, 3:52 pm, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote:> I don''t know how to get more info about this issue on my remote server > ( Linux/Debian6 - Qmail) > > localhost testing is fine > , so my class UserMailer < ActionMailer::Base is rendering correctly > the email ( checked in the development log) > > now, testing the remote SMTP server , via the production console, > using : > ActionMailer::Base.smtp_settings = {:address => > "mail.mydomain.com",:port => 587,:domain => > "mydomain.com",:authentication => :login, :user_name => > "mys...-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org",:password => > "xxxxxxxxxxxx",:enable_starttls_auto => false} > > class MyMailer < ActionMailer::Base > def test_email > @recipients = "mys...-BUHhN+a2lJ4@public.gmane.org" > @from = "nore...-3Q2Tfjf0mexWk0Htik3J/w@public.gmane.org" > @subject = "this is a subject" > @body = "this is the body" > end > end > > >> MyMailer::deliver_test_email is delivering fine this test email > > I used these smtp_settings, in a specific initializer file : > config/initializers/mail.rb > but then I get the Errno::ECONNREFUSED in production log, right after > the email rendering ... > > how can I check what''s wrong ? the production log doesn''t give me > enough info ... > > thanks for your feedback .. I''m lost in translation ...-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Reasonably Related Threads
- Why won't my ActionMailer work inside the controller?
- Errno::ECONNREFUSED (Connection refused - connect(2)) Act
- SMTP settings for action mailer
- Rails- Devise- confirmable- confirmation email not received
- Ruby 1.8.7 + Rails 2.3.2 + TLS = Where's the documentation?