How do I get Action Mailer to use my Hotmail, or my GMail account. I
will only be using these while testing my app, because when my app is
ready I will get a server to host it. I will then be using that server
for sending emails.
I just want to get Action Mailer working, I don't mind creating an
account on Yahoo, etc.. So if any one can tell me about an email
account that just works with Action Mailer, that would be great.
I have successfully setup actionmailer with GMail, which gives full
pop3/smtp/imap access. Please note that GMail uses TLS for smtp
access, though. The Net::SMTP class for ruby 1.8.x doesn't support
tls, however the same class does in ruby 1.9. I'd download smtp.rb
from ruby 1.9 and put it in your /lib directory:
Hi Jim,
Im trying to use smtp.gmail.com for sending mail using rails
application. Currently Im using ruby 1.8 and so according to your
suggestion I copied the smtp.rb file in /net directory. But now Im
getting a new type of error when I try to send the mail. The error is
NoMethodError in EmailerController#sendmail
undefined method `lines' for #<String:0x343530c>
RAILS_ROOT: C:/Alterum/email
Hi Jim,
Im trying to use smtp.gmail.com for sending mail using rails
application. Currently Im using ruby 1.8 and so according to your
suggestion I copied the smtp.rb file in /net directory. But now Im
getting a new type of error when I try to send the mail. The error is
NoMethodError in EmailerController#sendmail
undefined method `lines' for #<String:0x343530c>
RAILS_ROOT: C:/Alterum/email
I get the same problem. I also need a solution - you might try the
tlsmail gem.
I can't use that, because its cram_md5 is broken.
Does anyone have a fix, or have another solution?
Do a Google search for smtp_tls, download it to your app's lib
directory and setup action mailer to use smtp. The Rails Wiki has a
great example of how to setup ActionMailer for SMTP.