Hi all I used the search for this, but I got an Application Error, so sorry for the newbie question. I have tried to send an e-mail using ActionMailer. I have to following config (environment.rb): ActionMailer::Base.server_settings = { :address => "mail.psyguide.org", :port => 25, :domain => "mail.psyguide.org", #:authentication => :login, #:user_name => "dave", #:password => "secret", } ActionMailer::Base.default_charset = "utf-8" The mail seems to be sent without any problem, and in the log file I can''t figure out any problem. But the e-mail just doesn''t arrive... How can I debug this problem? Thanks for help. Josh -- Posted via http://www.ruby-forum.com/.
did you check the logs of your mailserver ? On 1/24/06, Joshua Muheim <forum@josh.ch> wrote:> Hi all > > I used the search for this, but I got an Application Error, so sorry for > the newbie question. > > I have tried to send an e-mail using ActionMailer. I have to following > config (environment.rb): > > ActionMailer::Base.server_settings = { > :address => "mail.psyguide.org", > :port => 25, > :domain => "mail.psyguide.org", > #:authentication => :login, > #:user_name => "dave", > #:password => "secret", > } > ActionMailer::Base.default_charset = "utf-8" > > The mail seems to be sent without any problem, and in the log file I > can''t figure out any problem. But the e-mail just doesn''t arrive... How > can I debug this problem? > > Thanks for help. > Josh > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Adam Denenberg wrote:> did you check the logs of your mailserver ?Hrm don''t know where I could do that. Wrote an e-mail to the support of my webspace. Is there another way to debug? Shouldn''t I have the possibility somehow to detect within Rails whether the e-mail was sent successfully or not and then throw an exception if needed...? -- Posted via http://www.ruby-forum.com/.
2006/1/24, Joshua Muheim <forum@josh.ch>:> ....1. You can explicitly enforce some rules (in environment.rb): ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true and send email (using ActionMailer), say, to your own email address. (Maybe problem isn''t ActionMailer, but mailserver?) 2. Run in development environment, so if you get Application Error you can trace down where it happens and debug if needed HTH
Its weird I''m actually having the exact same problem right now. I have no idea how you would check your logs. In your code above, have you tried changing the domain to psyguide.org and not mail.psyguide.org? -- Posted via http://www.ruby-forum.com/.
Lugovoi Nikolai wrote:> 2006/1/24, Joshua Muheim <forum@josh.ch>: >> .... > > 1. You can explicitly enforce some rules (in environment.rb): > ActionMailer::Base.delivery_method = :smtp > ActionMailer::Base.perform_deliveries = true > ActionMailer::Base.raise_delivery_errors = true > > and send email (using ActionMailer), say, to your own email address. > (Maybe problem isn''t ActionMailer, but mailserver?) > > 2. Run in development environment, so if you get Application Error you > can trace down where it happens and debug if needed > > HTHIf I add those to environment.rb I get a big ass error Net::SMTPSyntaxError in Email#confirm 502 Error: command not implemented -- Posted via http://www.ruby-forum.com/.
Thanks, I got the error that the e-mail webmaster@psyguide.org doesn''t exist (which is correct). I changed it to a correct e-mail, and now it works. Thanks a lot! :-) Btw. what should be the correct settings for a productive environment? There I don''t want to see the user such warnings... -- Posted via http://www.ruby-forum.com/.
Joshua Muheim wrote:> Thanks, I got the error that the e-mail webmaster@psyguide.org doesn''t > exist (which is correct). I changed it to a correct e-mail, and now it > works. Thanks a lot! :-) > > Btw. what should be the correct settings for a productive environment? > There I don''t want to see the user such warnings...I''m glad you found the problem. I''m getting this error 502 Error: command not implemented RAILS_ROOT: /Users/alexp/Sites/pulse/script/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/1.8/net/smtp.rb:680:in `check_response'' /usr/lib/ruby/1.8/net/smtp.rb:582:in `auth_login'' /usr/lib/ruby/1.8/net/smtp.rb:581:in `critical'' /usr/lib/ruby/1.8/net/smtp.rb:581:in `auth_login'' /usr/lib/ruby/1.8/net/smtp.rb:571:in `__send__'' /usr/lib/ruby/1.8/net/smtp.rb:571:in `authenticate'' /usr/lib/ruby/1.8/net/smtp.rb:411:in `do_start'' /usr/lib/ruby/1.8/net/smtp.rb:378:in `start'' /usr/lib/ruby/1.8/net/smtp.rb:316:in `start'' ... Does that mean my code is wrong or the smtp settings? -- Posted via http://www.ruby-forum.com/.
2006/1/24, Alexander Peretti <alex.peretti@pulsedev.net>:> I''m getting this error > 502 Error: command not implementedThese are really essential points, thanks for providing:> /usr/lib/ruby/1.8/net/smtp.rb:582:in `auth_login'' > /usr/lib/ruby/1.8/net/smtp.rb:571:in `authenticate''So, it''s your SMTP server that says it can''t handle command AUTH LOGIN> Does that mean my code is wrong or the smtp settings? >Try to change in environment.rb: ActionMailer::Base.server_settings = { ... # here go your server settings :authentication => :plain #or omit this line if your server doesn''t require authentication } Hint: you can check your SMTP sever via telnet (google a little about SMTP command and telnet use :) HTH