SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Question regarding development environment...

    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.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,157
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    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

  3. #3
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using SMTP.
    Have a good day.

  4. #4
    SitePoint Enthusiast thebasti's Avatar
    Join Date
    Aug 2004
    Location
    Novi Sad, Serbia
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •