1

I use Gmail G Suite to send email messages using it as an smtp relay, so in my web app web.config I use smtp-relay.gmail.com; I'd like to count how many mails are sent with this method.
I tried the Report API GMail but the data are not updated realtime and also they do no track email sent via the smtp relay.
I've seen that if I go in G Suite the Admin Console, then Reports and click on Email Log Search I can see, if I restrict the research to today, the number of the mails sent via the smtp relay method; I tried to see if there are an API related to this, maybe this is the G Suite Email Audit API, but I don't understand if I can use it to simply count the mails sent (and/or received) when I do the rest request.
With the API it is possible to create an email monitor, but I don't know (or don't know if this is the way to follow) if it is sufficient to retrieve a simple count.

  • Did you try out the methods and check if [Creating a new email monitor](https://developers.google.com/admin-sdk/email-audit/#creating_a_new_email_monitor) from Email Audit API suits you? – ReyAnthonyRenacia Jan 30 '18 at 12:16
  • Sincerely I don't understand how to use it, in the sense that I can create the monitor and also retrieve the monitors for user, but how to have the data regarding the mail sent? Have I to create a mailbox for export? – Marco Mangiante Jan 30 '18 at 16:00

0 Answers0