Setting up Rails to send mail with Gmail

59 views
Skip to first unread message

Mike C

unread,
Aug 8, 2008, 11:47:02 PM8/8/08
to Ruby on Rails: Talk
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!

CPerry

unread,
Aug 9, 2008, 1:29:06 AM8/9/08
to Ruby on Rails: Talk

Mike C

unread,
Aug 9, 2008, 6:38:09 PM8/9/08
to Ruby on Rails: Talk
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.

Mike C

unread,
Aug 9, 2008, 11:45:10 PM8/9/08
to Ruby on Rails: Talk
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.
Message has been deleted

Mike C

unread,
Aug 10, 2008, 5:27:15 PM8/10/08
to Ruby on Rails: Talk
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.

On Aug 9, 9:27 pm, PJAY79 <pjay1...@hotmail.com> wrote:
> I used tlsmail gem:
>
> http://therailscoder.typepad.com/the_rails_coder_ruby_on_r/2008/04/us...
>
> I had problems sending emails in development, but they worked fine in
> production.
>
> PJ.
Message has been deleted

Mike C

unread,
Aug 10, 2008, 8:10:40 PM8/10/08
to Ruby on Rails: Talk
I see...but why would my ISP be a problem in this if the mails are
being sent from Google?

On Aug 10, 4:20 pm, PJAY79 <pjay1...@hotmail.com> wrote:
> 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.

dataknife

unread,
Aug 10, 2008, 8:14:31 PM8/10/08
to Ruby on Rails: Talk
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.

Matt Grande

unread,
Aug 11, 2008, 8:19:39 AM8/11/08
to Ruby on Rails: Talk
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

Mike C

unread,
Aug 11, 2008, 9:59:32 AM8/11/08
to Ruby on Rails: Talk
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?

On Aug 11, 5:19 am, Matt Grande <matt.gra...@gmail.com> wrote:
> 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-39...
Reply all
Reply to author
Forward
0 new messages