Mandrill Account Information Example

Viewing your account information allows you to see general information about your account. You can also view information about the emails you have sent.

Example

Contact Form
Username
Reputation
Hourly Quota
Backlog
Mail Sent Today
Complaints in the last 7 days
All time opens

Step By Step

Step 1

First you need to follow the guide for integrating the DLL and setting up Easy Email at Setting Up.

Next all that is required is the below code, placed inside the click handler of the send button.

EasyEmailForMandrill.MandrillAccount.AccountInformation accountInformation = 
new EasyEmailForMandrill.MandrillAccount.AccountInformation();

lblUserName.Text = accountInformation.UserName;
lblRep.Text = accountInformation.Reputation.ToString();
lblQuota.Text = accountInformation.HourlyQuota.ToString();
lblBacklog.Text = accountInformation.Backlog.ToString();
lblMailToday.Text = accountInformation.TodaySendSummary.Sent.ToString();
lblCompaintsWeek.Text = 
    accountInformation.Last7DaysSendSummary.Complaints.ToString();
lblOpensAllTime.Text = accountInformation.AllTimeSendSummary.Opens.ToString();
            

Completed!

That's all you need to do to get your Mandrill account information with Easy Email For Mandrill

Below is an example of the response data you will receive.

{
    "username": example username,
    "created_at": example created_at,
    "public_id": example public_id,
    "reputation": 42,
    "hourly_quota": 42,
    "backlog": 42,
    "stats": {
        "today": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        },
        "last_7_days": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        },
        "last_30_days": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        },
        "last_60_days": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        },
        "last_90_days": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        },
        "all_time": {
            "sent": 42,
            "hard_bounces": 42,
            "soft_bounces": 42,
            "rejects": 42,
            "complaints": 42,
            "unsubs": 42,
            "opens": 42,
            "unique_opens": 42,
            "clicks": 42,
            "unique_clicks": 42
        }
    }
}