views:

51

answers:

1

Hi, I am really really new to Ruby On Rails, so I think it is a easy question.

I am setting up a OpenSource RoR application on a testing server. However couldn't get it sending email though our Exchange server. The testing server and Exchange server are both set correctly, I can test that using other web application on the same server.

However, I spend hours and couldn't get this particular Application (ticket_mule) sending email. Now in errorlog, it will show:

Net::SMTPSyntaxError (501 5.5.4 Invalid Address):

Which is not very helpful for me, as I am not even sure which address it meant: SMTP server, sender email, receipt or webpage?

The web app is using ActionMailer, and by reading the code, I've changed various of SMTP settings in environment.rb, and domain settings in config.yml and its notifier.rb code as well, but it just wouldn't work. I am pretty sure I know the right SMTP settings. But the problems is that this particular application have different settings in different places which I think may related to my problem.

I think I really need to know a better way to debug it besides looking at error_log.

Thank you in advance!

+1  A: 

Since you're using Exchange, I think you're running into a UNIX/Exchange problem This Article describes the 5.5.4 Invalid Address.

To "prove" you could:

> telnet a1.psgroup.com 25
Response:
220 a1.psgroup.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.1600 ready at Wed, 28 Feb 2001 16:18:08 -0500 
HELO mail.luminate.net.
501 5.5.4 Invalid Address

It has a workaround if you have server access to exchange.

Jesse Wolgamott
Thank you, but I think not in my case.I've already tried this KB: http://support.microsoft.com/?id=153119which was working.and HELO will give me 250 message, I think which confirmed it is working.
pstar
hmmm ok.... I'd try a non-exchange email first. Remove that as a possible complicating factor. Good luck!
Jesse Wolgamott
Good point, seems Gmail SMTP doesn't working as well.
pstar
Also recommend that you make sure that turn config.action_mailer.raise_delivery_errors = true on /config/environments/development.rb -- maybe then you can get a better error message.
Jesse Wolgamott
Thank you Jesse. After your post, I realized that I am not sure whether I am using development or production setting. Turns out I am in a production environment and after turned off cache etc. It was much more easy to debug (of course!). Looks like the initial code from that application doesn't pass the correct email address to SMTP. Hence the "Invalid Address" error.
pstar