Will emails actually be sent or just simulated when in development environment? My log shows successful email but not emails were sent...
| SitePoint Sponsor |





Will emails actually be sent or just simulated when in development environment? My log shows successful email but not emails were sent...
Have a good day.


AFAIK, there is no email sending restriction for the development or testing environments.
I don't know, but I imagine it's similar to PHP's mail() function. That is, ActionMailer sends the mail request to the email server, and if it sends it to the email server OK it considers it a "success". Whether or not the email server successfully sends the email to the client, and whether or not the email client successfully receives the email, is another story.
Check the configuration of your email server and the "junk" folder of the account you're sending it to.
http://wiki.rubyonrails.org/rails/pages/ActionMailer





I am using SMTP.
Have a good day.
By default ActiveMailer always tries to send an email. You can override this setting by adding something like this to your configuration (for example in config/environment.rb or in one of the environment files; for development config/environments/development.rb):
Code Ruby:config.action_mailer.perform_deliveries = false
Possible reason why email isn't sent, but your app thinks it was might be because your server isn't properly configured to send email and by default ActionMailer is configured not to care about delivery errors in development. You can change this setting in config/environments/development.rb on this line:
Code Ruby:config.action_mailer.raise_delivery_errors = false
Either way, if you see that an email would be sent (in your log file) that means properly configured server would have sent it.
"Strategy without tactics is the slowest route to victory.
Tactics without strategy is the noise before defeat."
- Sun Tzu
Icebergist - a web dev blog | Orange Iceberg Web App Development
Bookmarks