views:

40

answers:

2

Here are my smtp settings for Google Apps in setup_mail.rb.

  :address              => "smtp.gmail.com",  
  :port                 => 587,                 
  :domain               => 'mysite.co',  
  :user_name            => '[email protected]',      
  :password             => 'password',      
  :authentication       => 'plain',             
  :enable_starttls_auto => true

My development logs show in detail the e-mails being generated and sent to the right e-mail address... but they are not arriving. I can only think that there must be something wrong with the settings above. Can you see what the problem is?

Once this is solved, would I have any issue getting it to work on Heroku?


Note: the above is logging a deprecation warning:

DEPRECATION WARNING: Giving a hash to body is deprecated, please use instance va
riables instead. (called from process at C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gem
s/actionmailer-3.0.0/lib/action_mailer/old_api.rb:77)
A: 

I haven't used rails3 but I remember reading that sent emails in development are sent to the sender. Your deprecation warning is because you're defining variables for the email template in the previous hash format. Rails 3 works differently. In my experience deploying to heroku works flawlessly but you will need to define mx records.

mark
Hi Mark. Can you please be more specific? How do you actually fix the deprecation? Sent e-mails are only redirected to the sender in the development environment if you specify an interceptor.
sscirrus
Also, I have updated my MX records to Google Apps. I have a number of new e-mails under my domain name that work properly when I send/reply to e-mails manually - the question is now how do I get Rails to send these e-mails too :)
sscirrus