Setting up Rails to send mail with Gmail

So I want to use Gmail’s SMTP to send mail with my rails app, but it
isn’t working. I did what I was told (made a separate smtp_tls.rb in /
lib, added a mail.rb config in /initalizers, etc). Just wondering if
anyone knew of tutorials or steps to do this as the ones I’ve
encountered don’t seem to work. Thanks!

Here a few tutorials that may help you out…

http://www.danielfischer.com/2008/01/09/how-to-use-gmail-as-your-mail-server-for-rails/
http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html
http://railsforum.com/viewtopic.php?id=12875

Good luck with it.

–Cory

Thanks. I’ve tried those tutorials and it still doesn’t work which is
weird. I’ve also noticed in those tutorials that the plugin links seem
to be dead.

I checked the log, and it says the messages are being sent. However,
they aren’t. Also, I tried to supply incorrect login details and the
logs still say the messages have been sent, which are odd…any help
is appreciated.

Thanks! I tried this way too and it didn’t seem to work either…I’m
not sure what I’m doing wrong, I’m following all the directions.

It might be your internet service provider has blocked emails being
sent from a certain port. They do this to stop spam. My internet
service provider does this, but also gives me the option to allow
access to all ports.

Pj.

I used tlsmail gem:

http://therailscoder.typepad.com/the_rails_coder_ruby_on_r/2008/04/using-gmail-smt.html

I had problems sending emails in development, but they worked fine in
production.

PJ.

Google’s SMTP server is being contacted by your machine on port 25,
many isps now block any outbound open requests on port 25 - I believe
that google allows a different port, but you’d have to look inside
gmail to see which one it is.

I see…but why would my ISP be a problem in this if the mails are
being sent from Google?

I’ve got it running via port 587.

I’m pretty sure I used this to get it going:
http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html

Yeah, I tried that one too and it didn’t work. Not sure what’s going
on, but the thing about my ISP blocking it is the only logical
explanation for this at the moment. When you mention ISP, do you mean
my personal ISP for my computer or the ISP of my node/server?