Ruby Rails Action Mailer not working with Windows XP SMTP server?

S

shane.sherman

I have been trying to get basic e-mail sending working with Action
Mailer for 2 days now and I've pretty much exhausted every possible
solution I can think of.

I am using Windows XP Professional with the Default SMTP Virtual Server
setup to accecpt Anonymous connections. The domain set in the SMTP
settings is my machine name which I've specified in my Environment.rb
as

ActionMailer::Base.server_settings = {
:domain => 'machinename'
}

It's running on localhost, with no password, and It works fine with
other languages/framewords like C#/.NET.

Has anyone got this working, and if so how? What are your settings? Any
ideas on what I'm doing wrong?

The error I'm getting is :

Net::SMTPSyntaxError (501 5.5.4 Invalid Address
):
g:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response'
g:/ruby/lib/ruby/1.8/net/smtp.rb:653:in `getok'
g:/ruby/lib/ruby/1.8/net/smtp.rb:635:in `rcptto'
g:/ruby/lib/ruby/1.8/net/smtp.rb:546:in `send0'
g:/ruby/lib/ruby/1.8/net/smtp.rb:545:in `each'
g:/ruby/lib/ruby/1.8/net/smtp.rb:545:in `send0'
g:/ruby/lib/ruby/1.8/net/smtp.rb:472:in `sendmail'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:162:in
`perform_delivery_smtp'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:160:in
`start'
g:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:160:in
`perform_delivery_smtp'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:145:in
`send'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:145:in
`deliver'

g:/ruby/lib/ruby/gems/1.8/gems/actionmailer-0.8.1/lib/action_mailer/base.rb:113:in
`method_missing'
app/controllers/account_controller.rb:30:in `signup'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:700:in
`send'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:700:in
`perform_action_without_filters'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/filters.rb:294:in
`perform_action_without_benchmark'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/benchmarking.rb:30:in
`perform_action_without_rescue'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/benchmarking.rb:30:in
`measure'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/benchmarking.rb:30:in
`perform_action_without_rescue'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/rescue.rb:79:in
`perform_action'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:330:in
`send'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:330:in
`process'

g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:273:in
`process'
g:/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/dispatcher.rb:32:in
`dispatch'
F:/Development/Ruby/blindbot/public/dispatch.rb:10

g:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/dependencies.rb:187:in
`load'

g:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/dependencies.rb:187:in
`load'

g:/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:84:in
`handle_dispatch'

g:/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:35:in
`do_POST'
g:/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`__send__'
g:/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`service'
g:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
g:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
g:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
g:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
g:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
g:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
g:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
g:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
g:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
g:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'

g:/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:21:in
`dispatch'
script/server:48


Rendering
g:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/templates/rescues/layout.rhtml
(500 Internal Error)
 
L

Lyndon Samson

Have you tried telneting to the server

telnet localhost 25

220 localhost ESMTP Postfix
MAIL FROM:[email protected]
250 Ok
RCPT TO:samsonl
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
data
 
S

shane.sherman

Thanks, it actually turned out to be something very stupid. I ended up
having to add logging calls to base.rb to track this down but basically
I had "@recients = user.email" instead of "@recipients = user.email",
so it was trying to send the e-mail to no one.
 
J

James Britt

Thanks, it actually turned out to be something very stupid. I ended up
having to add logging calls to base.rb to track this down but basically
I had "@recients = user.email" instead of "@recipients = user.email",
so it was trying to send the e-mail to no one.


Ah, you forgot the magic module:

include DoWhatIWantNotWhatIType


James
 
L

Lyndon Samson

Thanks, it actually turned out to be something very stupid. I ended up
having to add logging calls to base.rb to track this down but basically
I had "@recients = user.email" instead of "@recipients = user.email",
so it was trying to send the e-mail to no one.

Sssh, don't log results like that in an archived mailing list, the
static typers you see, they will smell blood, and they are very
hungry... :)
 
P

Patrick Hurley

Sssh, don't log results like that in an archived mailing list, the
static typers you see, they will smell blood, and they are very
hungry... :)

So are the unit testers :)

Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top