Reputation: 2132
I have a Rails 3.0.5 app hosted in heroku. To send emails I use Sendgrid. Im in the free plan but it has a 200 email daily limit. I want to know if there is a way in Rails or in this addon "Sendgrid", to see how many emails have been sent today.
Upvotes: 1
Views: 586
Reputation: 895
The easiest way I found was to click on the SendGrid add-on in your app on Heroku. The main screen will tell you how many emails were sent today. If you click on the "Email Activity" tab you can see all of the emails that were sent.
Upvotes: 1
Reputation: 53156
Look at the SendGrid API..
REST GET request to:
https://sendgrid.com/apiv2/reseller.account.json?api_user=username&api_key=secureSecret&task=overview&[email protected]
Source: AccountOverview API
Will return something like:
<result> <overview> <reputation>100</reputation> <requests>50000</requests> <package>Silver Package</package> <credits_allowed>50000</credits_allowed> <credits_used>100000</credits_used> <credits_remain>0</credits_remain> <credits_overage>50000</credits_overage> <billing_start_date>2010-08-30</billing_start_date> <billing_end_date>2010-09-29</billing_end_date> <billing_process_date>2010-09-30</billing_process_date> </overview> </result>
(Edited due to linking the wrong API page).
Upvotes: 3