GetSendStatistics() public method

Returns the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity.

Each data point in the list contains statistics for a 15-minute interval.

This action is throttled at one request per second.

public GetSendStatistics ( ) : GetSendStatisticsResponse
return GetSendStatisticsResponse
        /// <summary>
        /// Retrieves SES statistics for the AWS account
        /// </summary>
        /// <returns></returns>
        public GetSendStatisticsResult getSendStats()
        {
            GetSendStatisticsResult ret = null;
            using (AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(_accessKeyID, _secretAccessKeyID))
            {

                GetSendStatisticsRequest request = new GetSendStatisticsRequest();
                GetSendStatisticsResponse response = client.GetSendStatistics(request);
                ret = response.GetSendStatisticsResult;
            }

            return ret;
        }
Exemplo n.º 2
0
    public static void SESGetSendStatistics()
    {
      #region SESGetSendStatistics
      var sesClient = new AmazonSimpleEmailServiceClient();

      var response = sesClient.GetSendStatistics();

      Console.WriteLine("For request " + 
        response.ResponseMetadata.RequestId + ":");

      if (response.SendDataPoints.Count > 0)
      {
        foreach (var point in response.SendDataPoints)
        {
          Console.WriteLine();
          Console.WriteLine("Data points for " + point.Timestamp + ":");
          Console.WriteLine("  Bounces: " + point.Bounces);
          Console.WriteLine("  Complaints: " + point.Complaints);
          Console.WriteLine("  Delivery Attempts: " + point.DeliveryAttempts);
          Console.WriteLine("  Rejects: " + point.Rejects);
        }
      }
      else
      {
        Console.WriteLine("No data points.");
      }
      #endregion

      Console.ReadLine();
    }