I am having troubles getting the email configured to work properly. On the development side I have updated the config settings to throw errors if they occur, but the email seems to go through ok, but I never receive the email. On the production server I get the following error message when creating a user that emails a confirmation via the after_create method. Loading production environment (Rails 2.0.2)>> User.create({?> :login => "admin", ?> :password => "XXXXX", ?> :password_confirmation => "XXXXX", ?> :first_name => "john", ?> :last_name => "doe", ?> :email => "john.doe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">> })Net::SMTPFatalError: 554 Message refused. On both servers I am using sendmail, although on the development server I have also tried smtp (config.action_mailer.delivery_method :sendmail). Both severs also have the sendmail file in the /usr/sbin folder. Thanks for any help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Test the sendmail installation from the command line. Make sure you don''t have any permission issues. There is no configuration required for sendmail. Rails will automagically send mails. On Dec 24, 2007 10:13 AM, Chris Olsen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > On the production server I get the following error message when creating > > Net::SMTPFatalError: 554 Message refused. > > On both servers I am using sendmail, although on the development server > I have also tried smtp (config.action_mailer.delivery_method > :sendmail). >-- http://www.rubyplus.org/ Free Ruby Screencasts --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Bala, I was just able to get the development version sending emails with sendmail (and smtp), and the only thing that I can think of why it now works was probably due to a server restart. I made the mistake of saying that previously the server was using sendmail, which it wasn''t, but rather it was using smtp. I did try restarting the server with those same settings to no avail. I have also set the server to use sendmail and am now able to create users from the console (email failure doesn''t cause rollback), but I am not receiving any emails. I am not sure what the problem is now. Thanks for the help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Test email addresses with different domains. Is the mail server running on the local server where your Rails app is deployed? Can you connect email client such as Apple Mail using the SMTP server settings and send email? If the mail server is configured properly, you should define the mail server settings in the appropriate environment config file, ex - for production , define it in production.rb. In Rails 2.0 the syntax has changed: ActionMailer::Base.smtp_settings = define_your_server_settings On Dec 24, 2007 11:22 AM, Chris Olsen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hey Bala, > > I was just able to get the development version sending emails with > sendmail (and smtp), and the only thing that I can think of why it now > works was probably due to a server restart. > >-- http://www.rubyplus.org/ Free Ruby and Rails Screencasts --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bala Paranj wrote:> Test email addresses with different domains.Doesn''t email to any of them.>Is the mail server running on > the local server where your Rails app is deployed?It is>Can you connect email client such as Apple Mail using the SMTP server settings and send email?Not sure what you mean> If the mail server is configured properly, you should define the mail server > settings in the appropriate environment config file, ex - for production, > define it in production.rb. In Rails 2.0 the syntax has changed: > > ActionMailer::Base.smtp_settings = define_your_server_settingsI am using sendmail right now so I don''t have any server settings. config.action_mailer.delivery_method = :sendmail I will try to see if smtp works with the settings in the 2.0 format. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Use email client such as ms outlook, eudora etc and use the parameters u r using in the rails app to connect to the email server. Check if u can send any email. Sent from my iPhone On Dec 24, 2007, at 5:26 PM, Chris Olsen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > wrote:> > Bala Paranj wrote: >> Test email addresses with different domains. > > Doesn''t email to any of them. > >> Is the mail server running on >> the local server where your Rails app is deployed? > > It is > >> Can you connect email client such as Apple Mail using the SMTP >> server settings and send email? > > Not sure what you mean >>> If the mail server is configured properly, you should define the >> mail server >> settings in the appropriate environment config file, ex - for >> production, >> define it in production.rb. In Rails 2.0 the syntax has changed: >> >> ActionMailer::Base.smtp_settings = define_your_server_settings > > I am using sendmail right now so I don''t have any server settings. > config.action_mailer.delivery_method = :sendmail > > I will try to see if smtp works with the settings in the 2.0 format. > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
To test this I reverted back to my config settings I used before (smtp) to test this and it now works. I have no idea why it is working now, but I am happy. Thanks for the help. Bcp wrote:> Use email client such as ms outlook, eudora etc and use the parameters > u r using in the rails app to connect to the email server. Check if u > can send any email. > > Sent from my iPhone > > On Dec 24, 2007, at 5:26 PM, Chris Olsen > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > > wrote: > >> >>> Can you connect email client such as Apple Mail using the SMTP >>> server settings and send email? >> >> Not sure what you mean >>-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---