Skip to content

Commit

Permalink
Sending asynchronous emails
Browse files Browse the repository at this point in the history
  • Loading branch information
maabernethy committed Jul 12, 2013
1 parent f6452ca commit 6e994dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ class EmailTriggerControllerTest < ActionController::IntegrationTest
end
```

## Sending Emails with JavaScript ##
Sending emails asynchronously will cause `#open_email` to not open the
correct email or not find any email at all depending on the state of the
email queue. We recommend forcing a sleep prior to trying to read any
email after an asynchronous event:

```ruby
click_link 'Send email'
sleep 0.1
open_email 'test@example.com'
```

## Authors ##

[Brian Cardarella](http://twitter.com/bcardarella)
Expand Down

0 comments on commit 6e994dc

Please sign in to comment.